Guides · Barcode formats
EAN-13 Barcode: Structure, Prefixes, Check Digit & UPC Explained
The EAN-13 is the international barcode on products in grocery stores, drugstores and online retail; in the US, its 12-digit sibling, the UPC-A, is the standard. Behind the 13 digits is a clear system.
Key takeaways
- The EAN-13 is a 13-digit barcode that encodes a globally unique item number. Today that number is officially called a GTIN-13.
- The digits consist of a GS1 prefix, a company prefix, an item reference and a check digit at the end.
- Prefixes 000 to 139 are issued by GS1 US for the US and Canada (400–440, for example, belong to GS1 Germany). The prefix shows where the number was registered, not where the product was made.
- A UPC-A is simply an EAN-13 with a leading zero: 036000291452 as a UPC is 0036000291452 as an EAN-13.
What is an EAN-13?
EAN originally stood for “European Article Number.” Since the system is used worldwide, it’s now called the GTIN (Global Trade Item Number). The name EAN-13 has stuck, though, and today mainly refers to the barcode that represents a 13-digit GTIN. The article What is a GTIN? explains exactly how GTIN, UPC, EAN and SKU differ.
POS systems, online marketplaces like Amazon or eBay, and inventory systems identify products by this number. In North America, retailers typically use the 12-digit UPC-A, while the EAN-13 is the standard almost everywhere else; scanners read both.
How the 13 digits are structured
Using the example 0036000291452 (the EAN-13 form of UPC 036000291452):
| Part | Digits in the example | Meaning |
|---|---|---|
| GS1 prefix | 003 | Prefix range 000–139: number issued by GS1 US |
| Company prefix + item reference | 600029145 | Identifies the manufacturer and the product. The split depends on the size of the company’s number block. |
| Check digit | 2 | Calculated from the first 12 digits; detects read and typing errors |
Important prefixes
| Prefix | Meaning |
|---|---|
| 000–139 | GS1 US (United States & Canada) |
| 400–440 | GS1 Germany (example) |
| 690–699 | GS1 China |
| 978, 979 | Books (ISBN as EAN) |
| 977 | Magazines and periodicals (ISSN) |
| 20–29 | Restricted internal use, e.g. in-store labels for random-weight items with weight or price |
So a product with a 000–139 prefix may well be manufactured in Asia. The prefix only tells you which GS1 member organization registered the company prefix.
How the check digit is calculated
- Take the first 12 digits.
- Multiply the digits alternately by 1 and 3, starting with 1 for the first digit from the left.
- Add up all the results.
- The check digit is the number needed to reach the next multiple of 10.
Example 003600029145: 0×1 + 0×3 + 3×1 + 6×3 + 0×1 + 0×3 + 0×1 + 2×3 + 9×1 + 1×3 + 4×1 + 5×3 = 58. To get to 60 you need 2, so the check digit is 2. The complete EAN-13 is 0036000291452.
Don’t want to do the math by hand? The free check digit calculator calculates the digit and validates codes for you.
How is the barcode itself structured?
The barcode is 95 modules wide. Slightly longer guard bars sit at the outer edges and in the middle. To the left and right of the center guard, six characters each encode digits 2 to 13. The first digit isn’t encoded as a character of its own; it results from the pattern used to encode the left half. That’s why the first digit is printed in the human-readable text to the left of the code.
EAN-13 vs. EAN-8, UPC-A and Code 128
| Format | Digits | Use |
|---|---|---|
| EAN-13 | 13 digits | Standard for retail products outside North America |
| EAN-8 | 8 digits | Very small packaging |
| UPC-A | 12 digits | US and Canada; reads as an EAN-13 with a leading 0 |
| Code 128 | Variable, alphanumeric | Shipping, logistics, internal numbers |
Where do I get my own UPC or EAN?
If you want to sell your own products in retail or on Amazon, you need an official GTIN. In the US, GS1 US licenses company prefixes and individual GTINs for a fee that depends on how many numbers you need. Offers that resell individual “UPC codes” very cheaply are risky: marketplaces increasingly check whether the number really belongs to your company.
For purely internal purposes, such as your own stock items that never leave the business, you can use numbers from the 20–29 range or print a Code 128 with your own item number. The barcode label generator creates the labels for you.
Scan EAN-13 and UPC codes and export them as a list
The fastest way to capture lots of UPC and EAN codes is by photo: Scan2List: Inventory Scanner detects every visible EAN-13 and UPC code in an image at the same time, merges duplicates and exports the list as a CSV for Excel, Google Sheets or import into your inventory system.
Frequently asked questions
What does the first digit (or prefix) of a barcode mean?
The first three digits are the GS1 prefix. Prefixes 000–139 are issued by GS1 US for the US and Canada; 400–440, for example, are issued by GS1 Germany. The prefix shows where the company number was registered, not where the product was made.
Is a UPC the same as an EAN-13?
Almost. A UPC-A has 12 digits; add a leading zero and you get the equivalent EAN-13. Officially, both are GTINs (GTIN-12 and GTIN-13), and scanners and POS systems worldwide read both.
Can I make up my own EAN or UPC?
Not for retail products. The number has to be globally unique and belong to your company, which is why it’s issued through GS1 (GS1 US in the United States). For internal purposes, you can use numbers from the 20–29 range.
How do I check whether an EAN or UPC is valid?
Calculate the check digit from the preceding digits and compare it with the last digit. Our free check digit calculator does this for you.