EAN 13 Barcode Explained
Introduction to EAN 13
Code EAN 13 is by far the most common barcode symbology worldwide. Used exclusively in retail and at the point-of-sale, almost every product carries an EAN barcode. EAN, short for European Article Numbering, is derived from the US-american UPC barcode symbology and was introduced in Europe in the early 1970s. EAN 13 encodes twelve digits and a check digit, hence the name; a shorter variant (eight digits) is EAN 8.
How to recognize an EAN 13 barcode
An EAN 13 barcode is easily recognized: It always starts and ends with two thin bars, the "start" and "stop" patterns. It also has two thin bars right in the center of the symbol. We've highlighted those patterns here:
When printed with human-readable text, the first digit is placed to the left of the code. Additionally, a ">" (also known as light margin indicator or LMI) can be placed to the right of the code. Both features indicate the so called "quiet zones". This space must be kept free of other graphical elements.
A "module" is the thinnest bar of a barcode symbol. The selected SC size (see below) determines the width and height of a module from which all other dimensions are derived.
Here's the code from the introduction with annotations:
EAN 13 vs UPC-A
Major differences (and similarities) between EAN 13 and UPC-A:
EAN 13 vs GTIN-13
Originally the 13 digit EAN number and the 13 digit EAN code were both referred to as EAN 13. Unifying the separate EAN and UPC standards under the GS1 umbrella introduced the GTIN (from Global Trade Item Number) to the world. The previous 13 digit EAN number became the GTIN-13 - another name but the same data content. With the introduction of new barcode symbologies (namely Code 128 GS1 and Data Matrix GS1) the EAN 13 barcode is now just one of several barcode symbologies that can be used to create a machine-readable representation of a GTIN-13.
EAN 13 vs GTIN-14
Any EAN 13 number (i.e. GTIN-13) can be converted into a GTIN-14 by prepending a "0" to the data. Once converted, the GTIN-14 can be encoded into Code 128 GS1, Data Matrix GS1 or ITF-14 barcodes.
Data content and format of an EAN 13 barcode
EAN 13 encodes twelve digits plus a mandatory check digit, hence the name EAN 13. The thirteen digits of an EAN 13 encode the following content:
Digit 1-2: Country identifier, e.g. 40, 41, 42, 43, 44 for Germany *
Digit 3-7: Manufacturer identifier **
Digit 8-12: Article number
Digit 13: Check digit
* Country code plus manufacturer identifier is also known as "company prefix", the two digits of the country code usually denote the country of the issuing GS1 branch; however, that's not necessarily the country where the article was produced. Codes beginning with "450" to "459" are used exclusively in Japan, here EAN 13 is referred to as JAN (Japanese Article Number). See nect section for a lit of country prefixes.
** Length can vary; larger manufacturers have shorter IDs for a bigger pool of available article numbers; GS1 maintains a database of manufacturers
EAN country codes
List of notable EAN country codes and prefixes:
EAN 13 containing price information (Restricted Circulation Numbers)
EAN 13 codes beginning with "20" - "29" are so-called in-store or in-house codes (officially: Restricted Circulation Numbers). They encode prices or weights, for example of produce or other articles where the sales price depends on the weight. Here's an example of an in-store EAN for salad that encodes a price (EUR 1.94):
An identical code, created with the Softmatic Barcode Extension for Adobe Illustrator:
In-house EANs will literally only work properly at the store where they were created; in other stores the codes will be rejected at checkout.
EAN 13 add-on barcodes
An EAN 13 symbol can carry an add-on barcode, sometimes also called a satellite code. The add-on can encode another two or five digits of data. This is used with ISBN barcodes (books) and ISSN barcodes (serials & periodicals).
Example EAN 13 with a five digit add-on code:
EAN 13 SC sizes
EAN 13 sizes are standardized (see this reference of EAN SC sizes). The module width and height are only allowed to vary within certain limits. The default, or 100%, size is called SC2. For SC2, the module width is set to 0.33mm, the height to 22.85mm. This yields a barcode that is roughly 26mm high and 37mm wide (including the textline and the left and right quiet zones):
It is permitted to vary the module width down to 80% and up to 200%. In addition, it is permitted to reduce the height to some degree, this is also known as truncation. As a rule, the height of a standard-sized EAN 13 should not be below 10mm.
Example of a truncated EAN (50%):
Code EAN 13 check digit
EAN 13 uses a modulo 10 checksum scheme. Starting from the right the numbers are multiplied alternating with "3" and "1" and added up. The sum is integer divided by ten, the reminder (or modulo) is subtracted from ten which then yields the check digit.
Example check digit calculation for Code EAN 13Using the sample barcode from above, our numbers are "401234567890".
Summing up: 0 * 3 + 9 * 1 + 8 * 3 + 7 * 1 + 6 * 3 + 5 * 1 + 4 * 3 + 3 * 1 + 2 * 3 + 1 * 1 + 0 * 3 + 4 * 1 = 89
Dividing: 89 / 10 = 8 Reminder 9
Check digit: 10 - 9 = 1
Note that using a check digit is mandatory. A code without the proper check digit will not scan. All Softmatic barcode products will automatically calculate the EAN check digit to ensure that a valid symbol will be created.
How to get an EAN 13 code
EAN numbers are maintained and issued by your country's GS1 branch, please see obtaining an EAN number for details. Only the national GS1 branches can issue valid (i.e. unique) company prefixes and numbers. Once you've been assigned a pool of EAN numbers, you can use one of Softmatic's barcode generators to create the actual, valid EAN 13 barcodes, see below for the various options.
NOTE: We do not recommend obtaining EAN 13 numbers from third parties who advertise on the Internet or Ebay with slogans like "Only need one EAN barcode?". These vendors will sell you a number from their own pool, exploiting a (historic) loophole in the assignment of EAN / UPC numbers. While those numbers are in principle valid, there's no guarantee that they are actually unique. In many cases the numbers are reused or they are re-assigned UPC numbers that were made EAN-compatible by adding a leading "0" to the twelve digit UPC number.
Sample Code EAN 13
Sample shows an EAN 13 in SC 2 size with human-readable text and light margin indicator:
Scanner recommendation for Code EAN 13
It is safe to assume that all barcode scanners available today support reading EAN 13. Especially older barcode scanners may have problems with codes printed with low resolution or when reading from a distance. Most current smartphones will also read EAN barcodes with the built-in camera, either with the "Camera" app or with a dedicated barcode scanner app.
Screenshot shows the CoScan app, a PDF and barcode scanner for iPhone. The EAN is detected and decoded in the life image; the EAN number can then be copied to the clipboard for further use in Excel, Word, Notes etc.:
EAN 13 printing considerations
EAN 13 is a very demanding barcode with tight tolerances in the range of 1/100mm (less than half a thou in inches). The minimum recommended print resolution is 300dpi. This is usually not a problem when printing the barcode with current laser or thermal printers. When printing with inkjets, choosing the right paper is paramount; most standard copier or laser paper will behave like blotting paper and cause so called ink spread. This effect will "thicken" the bars of the code, resulting in a symbol that does not conform to the standard.
In many cases, the barcode will have to be created with reduced bar width to compensate for ink spread or -growth. The amount of bar width reduction depends on the respective printing process. Laser, thermal or offset printing will have very low values (to the order of 0-2%) while silicon pad or screen printing will have higher values.
EAN 13 vector and raster file formats
Whenever possible, EAN 13 codes should be stored in a vector format, preferrably PDF. All current Softmatic barcode generators create codes as dependency-free CMYK PDFs with "pure black", i.e. C0 M0 Y0 K100. Avoid so called "rich blacks" (e.g. C50 M50 Y50 K100) which can cause issues with mis-aligned printing plates. SVG is an alternative but can cause conversion problems in pre press because CMYK color representation within an SVG is not widely supported. When using vector formats is not an option, CMYK-TIFFs are the second best choice, followed by PNG. Lossy formats like JPEG should be avoided.
Older versions of the Softmatic barcode generators would also create EAN codes as EPS. This format is no longer recommended as the EPS format is now considered unsafe; many applications will no longer import EPS files (example).
Online generators for EAN barcodes
A quick search for "create ean barcode online" will produce quite a few web services, some of which will also create EAN 13 codes. However, online generators are not without issues, especially when it comes to the very demanding and tightly specified EAN barcodes. We found that the created codes do often not comply with the GS1 standard; some generators will even let you enter arbitrary data, resulting in invalid codes. Here's an example EAN 13 from an online generator:
This is not a valid EAN 13 barcode; the final and check digit ("2") is wrong, it should be "7". As a result, this barcode will not scan. In addition, the GS1 makes precise requirements how to format and place the human readable text which the online generator clearly does not respect. It goes without saying that such a barcode will make your packaging or artwork look extremely unprofessional.
Compare to a standards compliant EAN 13:
Here's an example from another online barcode generator:
This online generator has the correct check digit but the text is far too small and the overall resolution is too low. This results in a symbol where the spaces and bars are very uneven; this is very noticable near the center of the code. The three single-width bars we highlighted in the image should all have the exact same width which they clearly don't. Likewise, the two-width bar directly to the left is far too thick. With some luck, the code will scan if printed with high enough resolution; however, it is evident that it does not comply with the standard and will fail a test with a barcode verifier.
Create EAN 13 barcodes with a font
Barcode fonts are a quick and easy way to create barcodes - provided the barcode is not too complicated, a good example would be Code 39. With EAN 13, using a barcode font is more involved because there is no direct mapping between the EAN number and the characters of the font. It is therefore not sufficient to simply select the numbers in Word, Excel or Google Docs and change the font to "EAN 13". Additional software is needed to calculate the check digit and prepare the number to work with the barcode font's character mapping.
Other problems come from the fact that the font renderer may try to "beautify" the text output. This causes small positional adjustments for each character which may render the code out of spec. Finally, as we've seen above, the created EAN barcode may require bar width reduction to compensate for ink spread, something that's impossible to achieve with a font.
Create EAN 13 in Google Sheets
The Softmatic Barcode add-on creates EAN codes directly in your sheets. The add-on also supports creating EAN codes from your data and then download them to your computer.
Create EAN 13 barcodes in Illustrator, InDesign
Easy to use barcode plug-ins and extensions for the Adobe flagship applications, seen here in Adobe Illustrator:
Softmatic's extensions for Adobe InDesign, Illustrator und Photoshop let you create EAN 13 directly in your documents and designs. For more videos, see the Softmatic Youtube Channel.
The Softmatic barcode plug-ins and extensions for InDesign, Illustrator and Photoshop are available on the Adobe Exchange and from the Softmatic online store.
Stand-alone EAN 13 generator
Fast and easy creation of standards-compliant EAN 13 barcodes with BarcodePlus V5, Softmatic's time tested barcode generator:
EAN 13 Barcode Bulk Generator
For batch creation of EAN 13 and the related ISBN / ISSN codes, use Softmatic BarcodeFactory V5, our time-tested bulk barcode generator. The software will create thousands of EAN symbols in seconds, with data coming from the built-in serial number generator, the clipboard or via import from Excel, Numbers or CSV text files. Ideal for mass creation of artwork for packaging, book or magazine covers etc.:
Generate EAN 13 barcodes with a font in Excel or Google Sheets
An easy way to add EAN 13 codes to your spreadsheet is via a barcode font. An add-in or macro that is supplied with the font handles check digit calculation and data conversion to create a valid barcode, like in this example:
More about the Softmatic EAN 13 add-in for Excel.