What is an EAN-13 barcode?
An EAN-13 barcode is a 13-digit retail barcode defined by GS1, the not-for-profit organization that manages product identification standards. It is scanned at checkouts and in warehouses worldwide, and the number it holds is a GTIN-13 (Global Trade Item Number).
EAN originally stood for European Article Number. Today the format is used internationally, and scanners in the US and Canada read EAN-13 as well as the 12-digit UPC-A.
What the 13 digits mean
- GS1 prefix (first 2–3 digits): identifies the GS1 member organization that issued the number. It does not indicate where a product was made.
- Company prefix: the rest of your GS1 Company Prefix, unique to your business. Its length varies.
- Item reference: the digits you assign to each product, size and variant.
- Check digit: the final digit, calculated from the other 12.
Special prefixes
- 978 and 979 are used for books, where the EAN-13 holds the ISBN.
- Prefixes 20–29 are reserved for restricted, in-store use, such as variable-weight items labeled by a shop. They are not unique worldwide.
What the bars look like
The barcode is 95 modules wide: a start guard, six left-hand digits, a center guard, six right-hand digits and an end guard. The first digit is not drawn as bars; it is encoded by the pattern of the six left-hand digits.
Do you need GS1 to get an EAN-13 barcode?
Yes, for retail. Any EAN-13 that goes on a product sold through retailers or major marketplaces should come from GS1. CardDeck draws the barcode from your number; it does not issue numbers.
How to get numbers
- Contact your local GS1 member organization.
- License a GS1 Company Prefix, sized to how many products you need to number, or buy individual GTINs where your GS1 organization offers them.
- Assign an item reference to each product and variant. Each size, color and pack size needs its own GTIN.
- Record product details in GS1's registry so retailers can match your numbers to your brand.
Avoid resold numbers
Some websites sell cheap EAN or UPC numbers that were originally licensed to another company. Retailers and marketplaces can check numbers against GS1's records, and a mismatch can get listings rejected. If your products are going into retail, buy directly from GS1.
When you do not need GS1
For items that never pass through a retail checkout, such as internal stock, assets, staff IDs or event tickets, use Code 128 instead, with any values you like.
How is the EAN-13 check digit calculated?
The EAN-13 check digit uses GS1's modulo-10 method: weight the first 12 digits alternately by 1 and 3 from the left, add the results and find the number that brings the total up to the next multiple of 10.
Worked example: 400638133393
- Write out the digits: 4 0 0 6 3 8 1 3 3 3 9 3.
- Multiply by 1, 3, 1, 3 and so on: 4, 0, 0, 18, 3, 24, 1, 9, 3, 9, 9, 9.
- Add them: 89.
- The next multiple of 10 is 90. 90 − 89 = 1.
- The check digit is 1, so the full number is 4006381333931.
If the total is already a multiple of 10, the check digit is 0.
Why it matters
The check digit lets a scanner catch most single-digit misreads and swapped neighboring digits. If the recalculated digit does not match, the scanner rejects the read.
What CardDeck does
- Enter 12 digits and CardDeck adds the check digit.
- Enter 13 digits and CardDeck verifies the last one, flagging a mismatch. A wrong check digit usually means a typo elsewhere in the number.
What size should an EAN-13 barcode be?
At 100% magnification, an EAN-13 barcode is about 37.29 mm wide and 25.93 mm tall including its quiet zones, with an X-dimension of 0.33 mm. GS1 allows magnifications from 80% to 200% for general retail use.
Magnification range
- 80%: about 29.8 × 20.7 mm. The smallest size for general retail.
- 100%: about 37.3 × 25.9 mm. The nominal size.
- 200%: about 74.6 × 51.9 mm. For large items or difficult surfaces.
Your printer or packaging supplier may recommend a minimum magnification for the printing process, because some processes spread ink and thicken bars.
Quiet zones
Leave at least 11 times the X-dimension clear on the left and 7 times on the right. At 100%, that is about 3.6 mm and 2.3 mm. Many printed barcodes fail because a box edge, a border or text runs into this space.
Height
Do not cut the bar height to fit a small pack. GS1 discourages truncation, because shorter bars are harder to scan at a checkout, where products are passed over the scanner at many angles.
Color and placement
- Black bars on a white background are safest. Dark blue or dark green on white can work.
- Never use red bars; checkout scanners use red light and cannot see them.
- Avoid seams, folds and tight curves, and put the barcode on the back or bottom of the pack where retailers expect it.
How do I create an EAN-13 barcode with CardDeck?
Choose EAN-13, enter your 12-digit GTIN, check the preview and download an SVG for your packaging artwork. For a whole range, generate them from a spreadsheet.
Single barcode
- Open the barcode generator and choose EAN-13.
- Enter the first 12 digits of your GTIN-13.
- Check the preview and the number printed under the bars.
- Download SVG and place it in your packaging artwork at 80–200% of nominal size.
- Print a proof on the real material and test-scan it.
A whole product range
- List your GTINs in a spreadsheet, one per row, with the column formatted as Text so leading zeros are kept.
- Upload it to the bulk barcode generator and choose EAN-13.
- Fix any flagged rows, such as wrong lengths or check digits.
- Download a ZIP of SVG files named after each number.
Selling in North America?
US and Canadian retailers' scanners read EAN-13. If a buyer specifically asks for UPC-A, see the UPC-A barcode generator. A UPC-A number is the same as an EAN-13 that starts with 0.
EAN-13 vs UPC-A
| Without CardDeck | With CardDeck | |
|---|---|---|
| Digits | UPC-A: 12 | EAN-13: 13 |
| Main region | UPC-A: US and Canada | EAN-13: international |
| Issued by | UPC-A: GS1 US | EAN-13: any GS1 member organization |
| Check digit | UPC-A: modulo 10, weights start at 3 | EAN-13: modulo 10, weights start at 1 |
| Relationship | UPC-A: a 12-digit GTIN | EAN-13: a UPC-A with a leading 0 is the same number |