EAN vs UPC: The Difference, GTIN, and Which to Enter in WooCommerce
A UPC is 12 digits and an EAN is 13, and they are the same system: add a zero to a UPC and it is an EAN. Where GTIN fits, the check digit worked by hand, which number to enter in WooCommerce, and the 12-or-13 digit trap at the till.
In this article16 sections
EAN vs UPC in one line: a UPC is a 12-digit product number and an EAN is a 13-digit one, and they belong to the same system. Put a zero in front of a UPC and you have a valid EAN. Both are kinds of GTIN, the name for the number itself, whatever its length.
So this is rarely a choice between two rival standards. The practical questions are which number to request for your own products, what to type into WooCommerce’s GTIN field, and why a scanner sometimes reads 13 digits off a pack that shows 12. This page answers those, with a check digit worked by hand.
EAN vs UPC: the differences side by side#
| UPC (UPC-A) | EAN (EAN-13) | |
|---|---|---|
| Digits | 12 | 13 |
| Full name | Universal Product Code | European Article Number, now International Article Number |
| Where it began | Grocery retail in the US and Canada | Europe, then the rest of the world |
| GTIN name | GTIN-12 | GTIN-13 |
| Short version for small packs | UPC-E | EAN-8 |
| Check digit | Last digit | Last digit, same method |
| Convert to the other | Add a leading 0 to make an EAN | Drop a leading 0, if there is one, to make a UPC |
Both barcodes are read by the same scanners and both carry nothing but the number: no price, no description. Everything else, including the price, comes from the product record the number points to.
What is a UPC?#
A UPC, strictly a UPC-A, is 12 digits assigned to one trade item, printed as bars with the digits underneath. It was the first retail barcode in wide use, and it is still the usual format on goods numbered for sale in the United States and Canada.
The 12 digits are a company prefix issued by GS1, an item number the company chooses, and a final check digit calculated from the other eleven. One number identifies one sellable item: the 500 ml bottle and the 1 litre bottle of the same shampoo have different UPCs, and so do the blue and the red T-shirt.
What is an EAN?#
An EAN is the 13-digit version. It was designed as an extension of the UPC: the same structure with one more digit at the front, which gave room for prefixes outside North America. The name was later changed to International Article Number, but the abbreviation EAN stuck, and “EAN” in everyday use means EAN-13.
Wikipedia’s article on the International Article Number describes EAN-13 as an extension of the earlier 12-digit UPC-A. That one fact explains most of the confusion: every UPC is an EAN with a zero in front, so a system built for 13 digits can hold both.
Where GTIN fits: one family, four lengths#
GTIN, Global Trade Item Number, is the name of the number. UPC and EAN are names that grew up around the barcodes carrying it. GS1, the body that issues the numbers, uses GTIN for all of them.
| GTIN | Digits | Usually printed as | Typical use |
|---|---|---|---|
| GTIN-8 | 8 | EAN-8 | Very small packs |
| GTIN-12 | 12 | UPC-A | Retail items, North American numbering |
| GTIN-13 | 13 | EAN-13 | Retail items everywhere |
| GTIN-14 | 14 | ITF-14 or GS1-128 | Cartons and cases of the same item |
When a marketplace or a product feed asks for “the GTIN”, it wants whichever of these is on your product. An ISBN on a book is part of the same family: books carry a 13-digit number starting 978 or 979. Where the field sits in WooCommerce and what it feeds is covered in our guide to the WooCommerce GTIN field.

How a UPC becomes an EAN: add a zero#
Take the UPC 036000291452. Written as an EAN-13 it is 0036000291452: the same twelve digits with a zero in front. Nothing else changes, including the check digit.
Going the other way only works when the EAN starts with a zero. The EAN 4006381333931 has no 12-digit form, because dropping its first digit would throw away part of the number. So:
- every UPC has an EAN form;
- only EANs beginning with 0 have a UPC form;
- a 13-digit number that does not begin with 0 must be stored and printed as 13 digits.
This is why a scanner or a spreadsheet can show the “same” product two ways, and why two systems can fail to match on a product that both of them hold.
The check digit, worked on one number#
The last digit of every UPC and EAN is a check digit: it lets a scanner or a form catch a misread or mistyped number. The method is the same for all GTIN lengths. Working from the right-hand end of the digits before the check digit, multiply them alternately by 3 and 1, add the results, and the check digit is whatever brings the total up to the next multiple of 10.
For 03600029145 (the UPC above without its last digit), from the right: 5×3, 4×1, 1×3, 9×1, 2×3, 0×1, 0×3, 0×1, 6×3, 3×1, 0×3.
- Digits multiplied by 3: 5 + 1 + 2 + 0 + 6 + 0 = 14, and 14 × 3 = 42
- Digits multiplied by 1: 4 + 9 + 0 + 0 + 3 = 16
- Total: 42 + 16 = 58, and the next multiple of 10 is 60
- Check digit: 60 − 58 = 2
That gives 036000291452. Adding the leading zero for the EAN form adds 0 to the sum, which is why the check digit stays 2. To test a number without the arithmetic, paste it into our free GTIN, UPC and EAN check digit calculator.
Which do you need? A rule by where you sell#
If a product arrives from a manufacturer with a barcode, the decision is made: use the number on the pack, exactly as printed. The choice only arises for products you make or brand yourself.
| Your situation | What to do |
|---|---|
| You resell branded goods | Use the manufacturer’s number. Never invent or reuse one. |
| Own products, sold only in your shop and on your site | No GTIN required. An internal code or the SKU is enough for your till. |
| Own products, sold through marketplaces or to other retailers | License GTINs from GS1 in your country. The numbers work worldwide. |
| Own products, mainly for North American retailers | Ask for numbers that have a 12-digit UPC form. |
| Variable-weight or shop-packed items | Use an internal number; see the 20 to 29 prefixes below. |
Whether you are issued 12 or 13 digits depends on the GS1 organisation you join. Either is accepted by modern scanners and by any system that stores the number as a GTIN. The difference between a product identifier and your own stock code is its own subject: SKU vs barcode.
EAN-8 and UPC-E: the short versions#
Some packs are too small for a full-width barcode: a lipstick, a single sweet, a pen. Two shorter symbols exist for them.
EAN-8 is its own 8-digit number, a GTIN-8, issued separately because there are far fewer of them. It is not a shortened EAN-13, and you can’t make one by trimming digits.
UPC-E is different: it is a compressed way of printing certain UPC-A numbers that contain runs of zeros. The scanner expands it back to the full 12 digits. So a UPC-E on the pack and a 12-digit UPC in your records can be the same number.
For your own shelf labels, the question is usually width, not which standard. How wide a code has to be to scan reliably is worked out in our guide to barcode label sizes.
Do the first digits show where a product was made?#
No. The first three digits of an EAN-13 are a GS1 prefix. They usually show which national GS1 organisation issued the company’s numbers, which is where the company registered, not where the goods were manufactured. A product numbered through a German GS1 membership can be made anywhere.
Two prefix ranges are useful to recognise at a counter:
- 978 and 979 mark books: the number is the ISBN.
- 20 to 29 are set aside for use inside a business. Shops use them for items they label themselves, such as cheese cut to weight or products with no manufacturer barcode. They mean nothing outside the shop that issued them, so never send one to a marketplace as a GTIN.
Which one to enter in WooCommerce’s GTIN field#
WooCommerce has a field for this on every product, under Product data → Inventory, labelled GTIN, UPC, EAN, or ISBN. It is one field for the whole family, so there is no separate place for a UPC and an EAN.
The rule: type the number exactly as it is printed under the bars, all digits, including any leading zero. A 12-digit UPC goes in as 12 digits; a 13-digit EAN as 13.
Three things the field does, as the product code in WooCommerce 11.3 shows:
- it keeps digits and hyphens (and a final X, for old 10-character ISBNs) and strips everything else, so spaces vanish;
- it refuses a number another product already holds, with the message “Invalid or duplicated GTIN, UPC, EAN or ISBN”;
- it stores the value in the product’s
_global_unique_idmeta.
Don’t count on the field to catch one mistyped digit; test the check digit before you save a batch.
Variations need their own numbers#
A variable product is several sellable items, and each one needs its own GTIN. The blue mug in a box and the green mug in a box have different barcodes on the box. WooCommerce gives every variation its own GTIN, UPC, EAN, or ISBN field inside the variation’s own panel.
Leave the parent’s field for a number that belongs to the product as a whole, which is rare. Don’t repeat the parent’s number on a variation: WooCommerce treats the value as unique across products, and a repeated one can be refused as a duplicate. For a product with twenty variations this is twenty numbers to type, so import them by CSV with one row per variation and check the digits before the import, not after.
Scanning at the till: the 12 or 13 digit trap#
The commonest scanning problem with these two formats has nothing to do with the barcode’s quality. The pack carries a 12-digit UPC, the product record holds 12 digits, and the scanner sends 13, with a zero in front. Many scanners have a setting that sends UPC-A in its 13-digit EAN form, and some arrive with it switched on. The till then looks for a number that isn’t in the catalogue.
To find out, scan a pack into a plain text editor and count the digits. Then choose one side and make it consistent:
- change the scanner setting so UPC-A is sent as 12 digits (the manual has a programming barcode for it), or
- store those products with the leading zero, as 13 digits.
The first is less work in a small catalogue. If scans still fail, the number may be sitting in a different field from the one your till searches; the three fields are compared in barcode scanner says product not found.
Products with no barcode: number them yourself#
Handmade goods, loose items and anything bought unbranded have no manufacturer number. For sales in your own shop you don’t need to buy one. Give each item a code your till can find and print it as a barcode on a shelf or price label.
Two sensible patterns:
- Use the SKU. If your SKUs are short and unique, the label can carry the SKU itself. Our free SKU generator builds a consistent set.
- Use an in-store number. A 13-digit number starting with a prefix from 20 to 29, with a correct check digit, prints as a normal EAN-13 and can’t collide with a real product’s number.
Keep these codes in a field your till searches, and leave the GTIN field empty for those products, because a feed or marketplace reading that field would treat the number as a real GTIN.
Mistakes to avoid with EAN and UPC#
- Dropping the leading zero. A spreadsheet that treats the column as a number removes it. Format the column as text before pasting.
- Reusing a number for a new product, or for a changed pack size. One number, one item, for good.
- Making up a number that looks real. It may belong to someone else’s product and will be rejected or mismatched by any system that checks.
- One barcode for all colours or sizes. The till can’t tell them apart, and stock goes wrong on every sale.
- Typing from the bars’ left edge. The small digit set apart at the far left of a UPC or EAN is part of the number.
- Putting an in-store 20 to 29 number in the GTIN field.
EAN and UPC at the counter with Retail POS#
Retail POS is our point of sale that runs in the WooCommerce admin. In the free version from WordPress.org, a scanned code is matched against the product’s barcode field, then WooCommerce’s own GTIN field, then the SKU, and a variation always wins over its parent. So a UPC or EAN you have already typed into the GTIN field rings up without entering it twice. A scanner gun needs no setup, and a phone camera can scan too: the decoders are set up for EAN-13, EAN-8, UPC-A and UPC-E, among other formats.

For products with no manufacturer barcode, the Labels screen prints your own: it detects EAN-13 and EAN-8 numbers and prints anything else as Code 128, at a label size you set in millimetres. Those labels are for your own counter. The plugin does not issue GTINs or check a number against GS1. Retail POS Pro adds counter features such as split payments and the cash register; the list is on the Retail POS page.
EAN vs UPC: frequently asked questions#
What is the difference between EAN and UPC?
A UPC has 12 digits and an EAN has 13. Both identify one product and belong to the same GS1 numbering system. EAN-13 was designed as an extension of the UPC, so any UPC becomes a valid EAN when a zero is added at the front. Scanners read both.
Can I convert a UPC to an EAN?
Yes. Put a zero in front of the 12-digit UPC and it is a 13-digit EAN with the same check digit. The reverse only works for EANs that begin with zero: remove that zero to get the UPC. An EAN starting with any other digit has no 12-digit form.
Is a GTIN the same as a UPC or EAN?
GTIN is the general name for the number. A UPC is a GTIN-12 and an EAN is a GTIN-13; there are also GTIN-8 for very small packs and GTIN-14 for cartons. When a form asks for a GTIN, enter whichever of these is printed on your product.
Which should I enter in WooCommerce, the EAN or the UPC?
Enter the number exactly as printed under the barcode, with every digit and any leading zero, in the field labelled GTIN, UPC, EAN, or ISBN on the Inventory tab. It is one field for all of them. Each variation of a variable product has its own field and needs its own number.
Does an EAN work in the United States?
Yes. Retail scanners and current point of sale systems read 13-digit EANs as well as 12-digit UPCs. Older systems built around 12 digits were the reason for the caution in the past. If a retailer you supply asks for a UPC, give a number that has a 12-digit form.
Do I need to buy barcodes to sell in my own shop?
No. A GTIN is needed when other businesses must recognise your product: marketplaces, product feeds and retailers. For your own counter and website you can scan the SKU or an in-store number starting with 20 to 29, printed on your own labels.
