Barcode
Message Forum
Symbology Specifications
News
Links
Barcode Printers
Services
Contact Us
Legal Info
Privacy Policy

UPCA SYMBOLOGY
See Also:
UPCA
UPCE
EAN8
Bookland
UPC 2Digit Supplement
UPC 5Digit Supplement
Symbology Index
Quick Links:
Background
Components
Encoding
Encoding Table
Checksum Calculation
Parity Table
Example
JAN Codes
EAN13, based upon the UPCA standard, was implemented
by the International Article Numbering Association (EAN) in Europe. This standard
was implemented mostly because the UPCA standard was not well designed for
international use, but probably partly because noone likes the U.S. to be in charge
of anythingespecially the Europeans. :)
EAN13 is a superset of UPCA. This means that any software or hardware capable of
reading an EAN13 symbol will automatically be able to read an UPCA symbol. The
only difference between EAN13 and UPCA is that the number system code in UPCA is
a single digit from 0 through 9 whereas an EAN13 number system code consists of two
digits ranging from 00 through 99, which is essentially a country code. Each
country has a numbering authority which assigns manufacturer codes to
companies within its jurisdiction. The manufacturer code is still five
digits long, as is the product code, and the check digit is calculated
in exactly the same way.
NOTE: Since EAN13 is a superset of UPCA and requires very
little additional effort to handle than an UPCA code, it is recommended
that all new designs implement EAN13 rather than UPCA. As already
mentioned, this guarantees compatibility with UPCA but also will make
your software/hardware appealing to the international community.
Otherwise your design will be restricted to the U.S. and Canada.
Additionally, the UCC Council has announced that as of January 1, 2005,
all bar code systems in the U.S. and Canada must be able to handle EAN13
bar codes so that international manufacturers do not have to worry about
printing a different bar code for their products destined for North
America.
A typical EAN13 bar code looks something like this:
The only difference between a UPCA symbol and an EAN13 symbol is that
the number system code is 2digits long in EAN13 as opposed to 1 digit
in UPCA. Visually, the humanreadable check digit is placed below the
bar code instead of to the right of it, but this does not make any
difference, technically speaking, regarding the encoding itself.
NOTE: In reality, an UPCA symbol is an EAN13 symbol with the
first number system digit set to 0. For example, take the UPCA code
"075678164125". This same code, expressed as an EAN13 symbol, would be
"0075678164125". As you can see, we just slapped a leading "0" in front.
Compare the original UPCA symbol (top) to the EAN13 symbol (bottom):
At first glance, the two bar codes look different. In UPCA there is
a number to the left and right of the bar code (a 0 number system and a
5 check digit), and below the bar code are two groups of 5 digits each
(the manufacturer code and the product code). In the EAN13 symbol,
there is no check digit to the right of the bar code, and the numbers
below the bar code consist of two groups of 6 digits each.
However, look closely at the bar codes themselves; that is, look at the
bars and spaces the make up the two bar codes. As you can see, the bars
and spaces themselves are identical in both UPCA and EAN13. The only
difference is where the "humanreadable" numbers are placed. Logically,
if a UPCA bar code is a subset of EAN13, the EAN13 representation of
a UPCA symbol must be identical. As witnessed above, that is the case.
COMPONENTS OF AN EAN13 BARCODE
An EAN13 bar code is divided into four areas: 1) The number system, 2) The
manufacturer code, 3) the product code, and 4) the check digit. Normally the
first number system digit is printed just to the left of the bar code, the
second number system digit is printed as the first character of the group
of six numbers on the lefthand side below the bar code, the manufacturer
code is the next five digits on the lefthand side below the bar code, the
product code product code is the first five digits on the righthand side
below the bar code, and the check digit is the last digit on the righthand
side below the bar code.
Number System: The number system consists of two digits (sometimes
three digits) which identify the country (or economic region) numbering
authority which assigned the manufacturer code. Any number system which
starts with the digit 0 is a UPCA bar code. The valid number
system codes are presented in the following table:
0013: USA & Canada 
2029: InStore Functions 
3037: France 
4044: Germany 
45: Japan (also 49) 
46: Russian Federation 
471: Taiwan 
474: Estonia 
475: Latvia 
477: Lithuania 
479: Sri Lanka 
480: Philippines 
482: Ukraine 
484: Moldova 
485: Armenia 
486: Georgia 
487: Kazakhstan 
489: Hong Kong 
49: Japan (JAN13) 
50: United Kingdom 
520: Greece 
528: Lebanon 
529: Cyprus 
531: Macedonia 
535: Malta 
539: Ireland 
54: Belgium & Luxembourg 
560: Portugal 
569: Iceland 
57: Denmark 
590: Poland 
594: Romania 
599: Hungary 
600 & 601: South Africa 
609: Mauritius 
611: Morocco 
613: Algeria 
619: Tunisia 
622: Egypt 
625: Jordan 
626: Iran 
64: Finland 
690692: China 
70: Norway 
729: Israel 
73: Sweden 
740: Guatemala 
741: El Salvador 
742: Honduras 
743: Nicaragua 
744: Costa Rica 
746: Dominican Republic 
750: Mexico 
759: Venezuela 
76: Switzerland 
770: Colombia 
773: Uruguay 
775: Peru 
777: Bolivia 
779: Argentina 
780: Chile 
784: Paraguay 
785: Peru 
786: Ecuador 
789: Brazil 
80  83: Italy 
84: Spain 
850: Cuba 
858: Slovakia 
859: Czech Republic 
860: Yugloslavia 
869: Turkey 
87: Netherlands 
880: South Korea 
885: Thailand 
888: Singapore 
890: India 
893: Vietnam 
899: Indonesia 
90 & 91: Austria 
93: Australia 
94: New Zealand 
955: Malaysia 
977: International Standard Serial Number for Periodicals (ISSN) 
978: International Standard Book Numbering (ISBN) 
979: International Standard Music Number (ISMN) 
980: Refund receipts 
981 & 982: Common Currency Coupons 
99: Coupons 
Manufacturer Code: The manufacturer code is a unique code assigned
to each manufacturer by the numbering authority indicated by the number
system code. All products produced by a given company will use the same
manufacturer code.
EAN uses what is called "variablelength manufacturer codes." Assigning fixedlength 5digit
manufacturer codes, as the UCC has done until recently, means that each manufacturer can
have up to 99,999 product codesand many manufacturers don't have that many products, which
means hundreds or even thousands of potential product codes are being wasted on manufacturers
that only have a few products. Thus if a potential manufacturer knows that it is only going
to produce a few products, EAN may issue it a longer manufacturer code, leaving less space
for the product code. This results in more efficient use of the available manufacturer and
procuct codes.
Product Code: The product code is a unique code assigned by the
manufacturer. Unlike the manufacturer code, which must be assigned by
the UCC, the manufacturer is free to assign product codes to each of
their products without consulting any other organization. Since the
UCC will already have guaranteed that the manufacturer code is unique,
the manufacturer need only make sure that they do not repeat their own
product codes.
Check Digit: The check digit is an additional digit used to verify
that a bar code has been scanned correctly. Since a scan can produce
incorrect data due to inconsistent scanning speed, print imperfections,
or a host of other problems, it is useful to verify that the rest of
the data in the bar code has been correctly interpreted. The check digit
is calculated based on the rest of the digits of the bar code. Normally,
if the check digit is the same as the value of the check digit based on
the data that has been scanned, there is a high level of confidence that
the bar code was scanned correctly. The method of calculating the check
digit will be discussed later in this page.
ENCODING EAN13 (AND UPCA)
The encoding for EAN13 (and UPCA) bar codes is relatively straightforward.
To encode a value as an EAN13 bar code, the checksum digit must first be
calculated and the entire bar code, including check digit, may then be
encoded as a sequence of bars and spaces.
NOTE: Encoding a UPCA symbol is identical to encoding a EAN13, a "0" is
simply inserted in front of the UPCA code itself (i.e., if the bar code is
075678164125, a zero is inserted before the code, making the EAN13 symbol
0075678164125).
COMPUTING THE CHECKSUM DIGIT
Before an EAN13 symbol may be encoded, the software must compute the
correct checksum digit which will be appended to the bar code. The checksum
digit is based on a modulo 10 calculation based on the weighted sum of the
values of each of the digits in the number system, manufacturer code, and
product code. In simple English, that means we must calculate a checksum
value for the bar code. First, we take the rightmost digit of the value
and consider it to be an "odd" character. We then move righttoleft,
alternating between odd and even. We then sum the numeric value of all
the even positions, and sum the numeric value multiplied by three of all
the odd positions.
The steps for calculating the check digit are as follows:
 Consider the rightmost digit of the message to be in an "odd" position, and assign odd/even to each character moving from right to left.
 Sum the digits in all odd positions, and multiply the result by 3.
 Sum the digits in all even positions.
 Sum the totals calculated in steps 2 and 3.
 The check digit is the number which, when added to the totals calculated in step 4, result in a number evenly divisible by 10.
 If the sum calculated in step 4 is evenly disivisible by 10, the check digit is "0" (not 10).
This is easier to understand with an example. Let's calculate the checksum
digit for the bar code 0075678164125. Actually, we know the checksum
digit is the last digit in the bar code, "5". This means the "message" itself
of the bar code is really 007567816412 (we just dropped the last character
of the bar code). This represents a number system of "00", a manufacturer
code of "75678" and a product code of "16412". Thus, we must calculate
a check digit for the message 007567816412.
Barcode 
0 
0 
7 
5 
6 
7 
8 
1 
6 
4 
1 
2 
Position 
E 
O 
E 
O 
E 
O 
E 
O 
E 
O 
E 
O 
Weighting 
1 
3 
1 
3 
1 
3 
1 
3 
1 
3 
1 
3 
Calculation 
0 * 1 
0 * 3 
7 * 1 
5 * 3 
6 * 1 
7 * 3 
8 * 1 
1 * 3 
6 * 1 
4 * 3 
1 * 1 
2 * 3 
Weighted Sum 
0 
0 
7 
15 
6 
21 
8 
3 
6 
12 
1 
6 
Summing up the weighted sum for each digit, we get 0 + 0 + 7 + 15 + 6 +
21 + 8 + 3 + 6 + 12 + 1 + 6 = 85. This is the checksum value. However,
there is only one checksum digit. The checksum digit is the value which
must be added to the checksum value in order to make it even divisible by
10. In this case, the next number following 85 which is evenly divisible
by 10 is the number 90. We must add 5 to 85 to get 90, therefore our check
digit is "5". We subsequently append the original bar code message
(007567816412) with our newly calculated check digit (5), to arrive at the
final value of 0075678164125.
Comparing this with our original bar code, we find that our calculated check
digit is in fact the same as the check digit that we found on the bar code.
Our calculation, therefore, is correct.
NOTE: You may be wondering why the first character in the EAN13
symbol is considered an "even" position and the second is considered "odd,"
etc. Logic would dictate that the first character be considered "odd" and
the second considered "even," etc. Do not dispair, there is a logical
reason for this.
This was done to preserve compatability with the original UPCA format.
The original UPCA symbol only had a single digit number system, therefore
what is the second character of an EAN13 symbol is what would be
considered the first character of an UPCA symbol, and would therefore be
in an "odd" position. Rather than rewriting and confusing the
specification, when the EAN13 standard was defined they simply inserted
the new, leading character in front and called it "even" thereby
maintaining compatability with existing UPCA bar codes and, to some extent,
with existing UPCA documentation.
You may use the following EAN13 Checksum Calculator to calculate the final
checksum digit for any EAN13 bar code. Simply enter the first 12 characters of
the bar code in the first field, click the "Calculate" button, and the final
checksum digit will appear in the field below. The calculator requires
that you have JavaScript enabled.
ENCODING THE SYMBOL
Once the checksum digit has been calculated we know the entire message
which must be encoded in the bars and spaces. Continuing with our example,
we will encode an EAN13 bar code for the value 0075678164125.
In the following text, we will discuss the encoding of the bar code by
considering that the number "1" represents a "dark" or "bar" section of
the bar code whereas a "0" represents a "light" or "space" section of the
bar code. Thus the numbers 1101 represents a doublewide bar (11), followed
by a singlewide space (0), followed by a singlewide bar (1). This would
be printed in the bar code as:
An EAN13 bar code has the following physical structure:
 Lefthand guard bars, or start sentinel, encoded as 101.
 The second character of the number system code, encoded as
described below.
 The five characters of the manufacturer code, encoded as described
below.
 Center guard pattern, encoded as 01010.
 The five characters of the product code, encoded as righthand
characters, described below.
 Check digit, encoded as a righthand character, described below.
 Righthand guard bars, or end sentinel, encoded as 101.
The characters that are encoded to the left of the center guard pattern
are considered the "left hand side" of the symbol whereas all characters
encoded to the right of the center guard pattern are considered the "right
hand side" of the symbol.
The first character of the EAN13 number system code (i.e., the first
digit of the EAN13 value) is encoded in the parity of the characters of
the lefthand side of the symbol. That is to say, the value of the first
character of the EAN13 value determines the parity with which each of
the characters in the lefthand side of the bar code will be encoded from
the following table.
NOTE: For "lefthand encoding", odd and even parity is often
referred to as "character set A" (odd) and "character set B" (even).
EAN CHARACTER SET ENCODING TABLE
This table indicates how to encode each digit of an EAN13 bar code
depending on which half (left or right) of the bar code the digit is
found in. In the case of a lefthand digit, the encoding (odd or even
parity) is based on the value of the first digit of the number system
code (see parity encoding table below).
DIGIT 
LEFTHAND ENCODING 
RIGHTHAND ENCODING 
ODD PARITY (A) 
EVEN PARITY (B) 
ALL CHARACTERS 
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 
OBSERVATIONS:
 An EAN13 character is represented in 7 elements consisting of 2
bars and 2 spaces. No bar or space may be longer than 4 elements.
The only exception to this rule is the left and right guard bars
(3 elements each) and the center guard bar (5 elements long).
 All characters in the lefthand side of the bar code always start
with a 0 (space) while all characters in the righthand side of
the bar code always start with a 1 (bar).
 The "righthand" encoding pattern is exactly the same as the
"lefthand odd" encoding pattern, but with 1's changed to 0's, and
0's changed to 1's.
 The "lefthand even" encoding pattern is based on the "lefthand odd"
encoding pattern. To arrive at the even encoding, work from the
left encoding and do the following: 1) Change all the 1's to 0's and
0's to 1. 2) Read the resulting encoding in reverse order (from
right to left). The result is the "lefthand even" encoding pattern.
EAN PARITY ENCODING TABLE
The following table indicates the parity with which each character in
the lefthand side of the bar code should be encoded. The parity is based
on the first digit of the EAN13 value. For example, our CD had the
EAN13 value of 0075678164125. In this case, the first digit of the
number system code is the first digit "0," so the parity would be based
on the number 0 in the following table:
FIRST NUMBER SYSTEM DIGIT 
PARITY TO ENCODE WITH 
SECOND NUMBER SYSTEM DIGIT 
MANUFACTURER CODE CHARACTERS 
1 
2 
3 
4 
5 
0 (UPCA) 
Odd 
Odd 
Odd 
Odd 
Odd 
Odd 
1 
Odd 
Odd 
Even 
Odd 
Even 
Even 
2 
Odd 
Odd 
Even 
Even 
Odd 
Even 
3 
Odd 
Odd 
Even 
Even 
Even 
Odd 
4 
Odd 
Even 
Odd 
Odd 
Even 
Even 
5 
Odd 
Even 
Even 
Odd 
Odd 
Even 
6 
Odd 
Even 
Even 
Even 
Odd 
Odd 
7 
Odd 
Even 
Odd 
Even 
Odd 
Even 
8 
Odd 
Even 
Odd 
Even 
Even 
Odd 
9 
Odd 
Even 
Even 
Odd 
Even 
Odd 
OBSERVATIONS:
 The second number system digit is always encoded with odd parity
(this becomes important at decodetime).
 A UPCA bar code always has a first number system digit of zero,
and therefore uses exclusively odd parity. In fact, any EAN13
symbol which has a first number system digit of 0 is actually an
UPCA symbol, not an EAN13 symbol.
 All EAN13 symbols (that have a first number system digit that
is nonzero) always have three lefthand characters that are
encoded using even parity and two that are encoded using odd parity.
The last two tables are the key and the genius in EAN13 encoding and its
compatability with existing UPCA symbols.
Consider, for a moment, a UPCA symbol. As already mentioned, a UPCA
symbol is simply an EAN13 symbol that has its first number system digit as
an "implied" zero. Consulting the parity table above, it is obvious that
when the first number system digit is zero, all the characters in the
lefthand side of the bar code will be encoded with "odd" parity. That is
to say, all UPCA bar codes use exclusively odd parity. This was the
original standard in UPCA. EAN13 just expanded on that standard and
defined the nonzero characters with other parity patterns. This is what
makes UPCA compatible with EAN13 (and also what makes EAN13 incompatible
with UPCA).
This example will encode the EAN13 bar code which represents the value
"7501031311309". This is number system "75", manufacturer code "01031",
product code "31130" (the check digit is "9", but we're going to calculate that
in this example). This is the bar code from a 12ounce can of Pepsi in the country
of Mexico.
First, we calculate the check digit:
Barcode 
7 
5 
0 
1 
0 
3 
1 
3 
1 
1 
3 
0 
Position 
E 
O 
E 
O 
E 
O 
E 
O 
E 
O 
E 
O 
Weighting 
1 
3 
1 
3 
1 
3 
1 
3 
1 
3 
1 
3 
Calculation 
7 * 1 
5 * 3 
0 * 1 
1 * 3 
0 * 1 
3 * 3 
1 * 1 
3 * 3 
1 * 1 
1 * 3 
3 * 1 
0 * 3 
Weighted Sum 
7 
15 
0 
3 
0 
9 
1 
9 
1 
3 
3 
0 
Summing the weighted sums we arive at 7 + 15 + 0 + 3 + 0 + 9 + 1 + 9 + 1
+ 3 + 3 + 0 = 51. We must add 9 to make 51 evenly divisible by 10 (51 +
9 = 60), therefore the check digit is 9. This matches the trailing "9"
that we observed in the bar code, so we calculated it correctly.
Next, we observe that the first digit of the number system code (the
leftmost digit in the bar code) is the digit "7". Consulting the parity
encoding table for the digit "7", we find that the parity for the second
number system digit and the manufacturer code should follow the pattern
"Odd/Even/Odd/Even/Odd/Even." That means the second number system digit
will be encoded from the "lefthand odd" parity table, the first digit
of the manufacturer code will be encoded with "lefthand even" parity, etc.
We can now start encoding our bar code with the following steps, or
sections. The bar code is then constructed by simply concatenating all
the strings together.
 LEFT GUARD BARS (always the same): 101.
 SECOND NUMBER SYSTEM DIGIT [5]: Encoded with lefthand odd parity, 0110001.
 1st MANUFACTURER DIGIT [0]: Encoding with lefthand even parity, 0100111.
 2nd MANUFACTURER DIGIT [1]: Encoded with lefthand odd parity, 0011001.
 3rd MANUFACTURER DIGIT [0]: Encoded with lefthand even parity, 0100111.
 4th MANUFACTURER DIGIT [3]: Encoded with lefthand odd parity, 0111101.
 5th MANUFACTURER DIGIT [1]: Encoded with lefthand even parity, 0110011.
 CENTAR GUARD BARS (always the same): 01010.
 1st PRODUCT CODE DIGIT [3]: Encoded as righthand character, 1000010.
 2nd PRODUCT CODE DIGIT [1]: Encoded as righthand character, 1100110.
 3rd PRODUCT CODE DIGIT [1]: Encoded as righthand character, 1100110.
 4th PRODUCT CODE DIGIT [3]: Encoded as righthand character, 1000010.
 5th PRODUCT CODE DIGIT [0]: Encoded as righthand character, 1110010.
 CHECK DIGIT [9]: Encoded as righthand character, 1110100.
 RIGHT GUARD BARS (always the same): 101.
Remember, a "1" represents a bar and a "0" represents a space. Thus if we
convert this string of numbers to their graphical representation we end
up with the following bar code:
In order to see more clearly the construction of the bar code, the following
graphic shows the exact same bar code but each character, or section, of
the bar code is indicated by alternating colors. Above the bar code, in each
colored section, is a number from 1 to 15, which corresponds to each of the
"steps," or sections, described above. You may easily compare the 10
sequence of each step to the graphical representation below:
JAN BACKGROUND INFORMATION
JAN (Japanese Numbering Authority) are EAN codes that use the number
system "49".
© Copyright 2006 BarCodeIsland.com, Inc. All Rights Reserved.
Information provided "asis" without warranty. Please see details.
Contact us for usage and copy permission.
