How to use it
- Enter the 12 digits of your GTIN to have the check digit added, or all 13 digits to check it.
- Keep the recommended size (0.33 mm bars) unless your packaging designer or retailer asks for another size.
- Download SVG or PDF for packaging artwork, so the bars stay sharp.
- Print a test copy and scan it before sending artwork to print.
How an EAN-13 number is built
EAN-13 carries a 13-digit GTIN (Global Trade Item Number). It starts with your GS1 company prefix, which identifies your business and varies in length, followed by an item reference you assign to each product, and ends with one check digit.
Only 12 digits are drawn as bars. The first digit isn't encoded directly: it's expressed by the pattern of how the next six digits are drawn, which is why it's printed outside the barcode on the left.
The first two or three digits show which national GS1 organisation issued the prefix, not where the product was made. Prefixes 978 and 979 are used for books (ISBN), 977 for magazines, and 20–29 for in-store numbers such as weighed goods.
The check digit
The 13th digit is calculated from the first 12 by weighting them alternately 1 and 3, adding the results, and taking the amount needed to reach the next multiple of 10. For 400638133393 the total is 89, so the check digit is 1 and the full number is 4006381333931. The check digit calculator shows each step for any number.
Getting a number: what this generator can't do
ScanHatch draws the barcode for a number you already have. It can't issue or register EAN numbers. For products sold through shops and major online marketplaces, retailers expect GTINs licensed from GS1, which checks that each number belongs to your company. A barcode with an invented number can scan perfectly and still be rejected, or clash with another company's product.
For internal uses such as stock rooms, the 20–29 in-store range or a different format like Code 128 avoids clashing with real product numbers.
Printing EAN-13
- GS1's nominal EAN-13 is 37.29 × 25.93 mm at a 0.33 mm module width, measured with the first digit sitting inside the left margin. ScanHatch's file at the same module width is about 42.6 × 27.7 mm, because it adds a full 11-module quiet zone on both sides and prints the digits as a separate line. The bars are the same size; the extra space is blank margin. GS1 allows module widths from 80% to 200% of nominal.
- Keep the light margin on the left at least 11 bars' width and on the right at least 7, and keep text and borders out of them.
- Black bars on white are the most reliable. Avoid red bars, which many scanners can't see.
- Don't shorten the bars to fit a small pack without checking your retailer's rules; truncated barcodes are often rejected.
Frequently asked questions
Can ScanHatch give me an official EAN number?
No. ScanHatch generates the barcode symbol only. Official GTINs for retail products come from GS1 (or an authorised reseller), and generating a barcode doesn't give you ownership of a number.
What if I only have 12 digits?
Enter the 12 digits and the check digit is calculated and added. The preview shows the complete 13-digit number.
Is EAN-13 the same as UPC-A?
A UPC-A number is an EAN-13 that starts with 0, and scanners read both. Shops in North America often ask for UPC-A; elsewhere EAN-13 is standard.
Which file should I send to my printer?
SVG or PDF. Both are vector files, so the bars stay exactly the right width at any size.
Related formats
Further reading
Need another format? The full Barcode Generator supports 15 barcode and 2D code types.