European Article Number
European Article Number
Manufacturer code, consisting of four or five digits depending on the length of the system or country
code.
Check digit, a single checksum digit. The check digit is computed modulo 10, where the weights in
the checksum calculation alternate 1 and 3. In particular, since the weights are relatively prime to 10
the EAN system will detect all single digit errors. But since the difference of consecutive weights is
even, the EAN system does not detect all adjacent transposition errors.
2-digit and 5-digit supplemental barcodes may be added for a total of 14 or 17 data digits.
Contents
1 Country codes
2 Encoding
3 See also
4 External links
Country codes
Further information: List of GS1 country codes
The first three digits of the barcode of any product represents the country. Note that EAN codes beginning
with 0 are rarely used, as this is just an addition to 12-digit UPC. Since most scanners and registers
worldwide can read both equally, most manufacturers in North America still only use UPC.
Encoding
To encode an EAN-13 barcode, the digits are first split into 3 groups, the
first digit, the first group of 6 and the last group of 6. The first group of six
is encoded using a scheme whereby each digit has two possible encodings, one of which has even parity and
one of which has odd parity. The first digit is encoded by selecting a
pattern of choices between these two encodings. All digits in the last group
of six digits are encoded using a single set of patterns which are the same
patterns used for UPC.
If the first digit is zero, all digits in the first group of six are encoded using
the patterns used for UPC, hence a UPC barcode is also an EAN-13
barcode with the first digit set to zero.
Structure of EAN-13
First digit First group of 6 digits Last group of 6 digits
0 LLLLLL RRRRRR
1 LLGLGG RRRRRR
2 LLGGLG RRRRRR
Encoding EAN-13
3 LLGGGL RRRRRR
4 LGLLGG RRRRRR
5 LGGLLG RRRRRR
6 LGGGLL RRRRRR
7 LGLGLG RRRRRR
8 LGLGGL RRRRRR
9 LGGLGL RRRRRR
Encode de digits
Digit L-code G-code R-code
0 0001101 0100111 1110010
1 0011001 0110011 1100110
2 0010011 0011011 1101100
3 0111101 0100001 1000010
4 0100011 0011101 1011100
5 0110001 0111001 1001110
6 0101111 0000101 1010000
7 0111011 0010001 1000100
8 0110111 0001001 1001000
9 0001011 0010111 1110100
See also
Electronic Data Interchange
Global Electronic Party Information Register (GEPIR) a searchable distributed database of GS1 codes
GTIN
EAN 8, another form of EAN barcode
External links
EAN-13 generator and free barcode analyser based on GS1 specifications for EAN and UPC
symbologies production.
The Barcode FAQ — links to barcode related white papers.
Barcode Symbology — Barcode symbology preview.
PHP barcode — Multiplatform opensource online barcode generator and EAN13 reader written in
PHP.
EAN.BE: independent information on barcodes & RFID
Online EAN-13 Generator
Free Open Source(GPL) Bar Code Generator
EAN-13 Encoding Learn how it works, see how it converts to a barcode
Pg-ean An EAN 13 datatype for PostgreSQL
Software to calculate checksum number of several barcodes types(freeware- Windows)