EAN-13 format explained: structure & prefixes
EAN-13 is the global retail barcode outside North America. This breakdown covers each part of the 13 digits, what the leading GS1 prefix really tells you, and how the check digit is derived.
What is an EAN-13 barcode?
An EAN-13 is the 13-digit retail barcode used on most products sold outside North America. It encodes a GTIN-13: two or three digits of GS1 prefix, a company prefix that GS1 licenses to the brand owner, an item reference, and one check digit at the end. GS1, the not-for-profit standards body, runs the numbering system.
A North American UPC-A is the same number with one leading zero added, so every UPC-A is also a valid EAN-13. To test a code you already have, paste it into the barcode validator. To see which product a shoe box barcode belongs to, use the sneaker barcode lookup.
Common EAN-13 prefix ranges
The first digits name the GS1 office that issued the company prefix. These are the ranges that appear most often on shoes, clothing and books:
| First digits | Issued by |
|---|---|
| 000 to 019, 030 to 039 and 060 to 139 | GS1 US (a UPC-A with a leading zero) |
| 020 to 029, 040 to 049 and 200 to 299 | Restricted: numbers a shop sets for its own use, for example weighed goods |
| 300 to 379 | GS1 France |
| 400 to 440 | GS1 Germany |
| 450 to 459 and 490 to 499 | GS1 Japan |
| 500 to 509 | GS1 UK |
| 690 to 699 | GS1 China |
| 840 to 849 | GS1 Spain |
| 880 | GS1 Korea |
| 977 | Serial publications (ISSN) |
| 978 and 979 | Books (ISBN) |
A Nike barcode is usually a UPC-A such as 196607429327. As an EAN-13 it reads 0196607429327, a number from the GS1 US range. An adidas barcode such as 4065427843513 starts with 40, a number from the GS1 Germany range. Both pairs can come from the same factory in Vietnam, which is why the prefix is not a country of origin. The next sections explain this.
Anatomy of the 13 digits
An EAN-13 is a GTIN-13, which means it holds 13 digits. Those digits break into three logical parts followed by a single check digit:
- A GS1 prefix of two or three digits at the start.
- A company prefix that GS1 licenses to a brand. Together with the GS1 prefix this identifies the organization.
- An item reference that the brand assigns to each distinct product.
The 13th and final digit is the check digit. The boundary between the company prefix and the item reference is not fixed. It depends on how many item numbers a company licensed, so you cannot reliably split those two parts just by looking at the number.
| Part | Position | What it identifies |
|---|---|---|
| GS1 prefix | First 2 to 3 digits | The GS1 member organization that issued the prefix |
| Company prefix | Variable length | The brand licensed by GS1 |
| Item reference | Remaining digits | The specific product the brand assigns |
| Check digit | 13th digit | Guards against misreads |
Text version
The first twelve positions contain the GS1 company prefix and item reference. The GS1 prefix is part of the company prefix. Their boundary varies with the allocation; there is no universal split. Position thirteen is the check digit.
What the leading prefix really means
The most common myth about EAN-13 is that the first digits tell you the country of manufacture. They do not. The leading GS1 prefix identifies the GS1 member organization that issued the company prefix. That organization is often described by country or region, but it is the numbering authority, not the factory.
A brand headquartered in one country can license a prefix from a GS1 office in another, and manufacturing can happen anywhere in the world. So a prefix commonly linked to one country only tells you which GS1 office allocated the number range. Treat it as an issuing-authority hint, never as proof of origin.
Never use the leading prefix to claim country of manufacture. A prefix in the 400 to 440 range is often called German, but it only means a German GS1 office allocated the number range. The goods themselves may be made anywhere in the world.
How the check digit is calculated
The final digit protects against misreads. To compute it for an EAN-13, take the first 12 digits and, working from the right, multiply them by alternating weights of 3 and 1. Sum the results, find the next multiple of ten at or above that sum, and subtract. The difference is the check digit, a number from 0 to 9.
A scanner runs the same math on every read and rejects the scan if the last digit does not match. You can walk through the arithmetic on any code with the EAN-13 check digit calculator. To confirm a whole number end to end, use the barcode validation tool.
Here is a worked example on the 12 data digits 590123412345. Working left to right, apply alternating weights of 1 and 3 and sum the products. Then round the sum up to the next multiple of ten and subtract.
data: 5 9 0 1 2 3 4 1 2 3 4 5
weight 1 3 1 3 1 3 1 3 1 3 1 3
sum = 83 -> next ten = 90 -> check digit = 7
EAN-13 and UPC-A together
UPC-A is the 12-digit relative of EAN-13. Add one leading zero to a UPC-A and you have a valid EAN-13, which is why both scan on the same equipment worldwide. This is also why you should normalize catalog data. A UPC and its zero-padded EAN twin are the same product and should resolve to the same record.
To move a code between the two widths without recomputing anything by hand, use the GTIN converter. You can inspect a real product record at an example lookup such as this page.
Here is why the compatibility matters in practice. A scanner does not care whether it reads 12 digits or 13. It hands the decoded number to your system, and your system decides what it means. If you store the raw 12-digit UPC in one place and the zero-padded 13-digit EAN in another, the same physical product splits into two records. Normalize to 14 digits on the way in and that split disappears.
Generating a valid EAN-13
To create a legitimate EAN-13 you need a GS1-licensed company prefix. You assign an item reference under that prefix, calculate the check digit, and then render the barcode. Do not invent numbers. A made-up EAN can collide with a real product, and retailers that verify against the GS1 registry will reject it.
Once you have a valid 13-digit value, the barcode generator produces a scannable image. The API documentation shows how to validate and generate at scale.
Frequently asked questions
Does an EAN-13 prefix tell me the country of manufacture?
No. The leading prefix identifies the GS1 member organization that issued the company prefix. That is a numbering authority tied to a region, not the country where the item was made.
Can I tell where the company prefix ends and the item number begins?
Not from the number alone. GS1 assigns company prefixes of varying lengths, so the split between company prefix and item reference is not visible in the digits.
Is EAN-13 the same as GTIN-13?
Yes. GTIN-13 is the 13-digit identifier and EAN-13 is the barcode symbology that encodes it. The number is identical.
Try the tools
Read our guides first in Google results: add Barcodes.gg as a preferred source.
Related reading
What is a GTIN? UPC, EAN & GS1 barcode standards
A GTIN is the GS1 Global Trade Item Number that sits above UPC, EAN and the 14-digit case code as one shared product identifier.
UPC vs EAN vs GTIN: what is the difference
UPC is not an alternative to GTIN. A UPC-A barcode carries a 12-digit GTIN-12, so UPC is one member of the wider GTIN family.
GTIN-14 explained: cases, cartons & pallets
GTIN-14 identifies a packaging level such as a case or carton by adding an indicator digit in front of the base product GTIN.
How to validate a barcode: UPC, EAN & GTIN
A practical guide to checking that a UPC, EAN, or GTIN is well formed before you trust it.