What the 13 digits mean
An EAN-13 (European Article Number, now managed by GS1 as the GTIN-13) is made of a GS1 prefix, a company prefix, an item reference and a check digit. The company prefix is licensed to a business, and that business gives each of its products an item reference. That is how two shops can scan the same box and get the same product.
The first two or three digits come from the GS1 office that issued the company prefix. They show where the company joined GS1, not where the product was made. A product made in Vietnam by a company registered in Germany can carry a German prefix.
- 978 and 979: ISBN numbers for books. The ISBN-13 on a book is an EAN-13.
- 977: ISSN numbers for magazines and journals.
- 2: numbers meant for use inside one store or company, for example for items priced by weight. They are not unique across shops.
- 0: an EAN-13 starting with 0 is a UPC-A with a 0 in front.
The first digit has no bars of its own
An EAN-13 draws 12 digits as bars: six on the left of the middle guard and six on the right. The first digit is not drawn. It is hidden in the pattern used for the left six digits, which each use one of two bar patterns, called odd and even parity. The mix of those patterns tells the scanner what the first digit is. This is how the format fits 13 digits into the same width as a 12 digit UPC-A, and it is why a UPC-A is an EAN-13 with a 0 in front: with a first digit of 0, all six left digits use the same pattern.
The long bars at the left, the middle and the right are guard bars. They tell the scanner where to start, where the halves meet and where to stop, and they let it work out the width of the thinnest bar. The tool draws them the standard way.
Sizes and the blank border
The symbol is 95 narrow bars wide. The standard asks for a blank space of 11 bars on the left and 7 on the right. The tool puts the first digit in the space on the left, as printed barcodes do. GS1 gives 0.33 mm as the normal bar width, which makes the bars about 31 mm wide and the barcode about 37 mm wide with the smallest blank border, and allows 80% to 200% of that size. Do not print smaller than 80%.
Print black bars on a white or light background, and do not use red or orange for the bars, because shop scanners use red light. Do not stretch the barcode in only one direction, and do not cut off the digits or the border to fit a label.