Barcodes
EAN-13 vs UPC-A: which one your product needs
UPC-A is an EAN-13 with a leading zero, so the real question is where your number came from. Digit counts, check digits, GS1 prefixes and the case code.
You have a product going into shops and a form in front of you asking for a barcode. The question that form is really asking is not which symbology to print. It is where your number came from — and if you have not answered that yet, no generator can help you.
Same symbology, different paperwork
UPC-A came first, in 1973, for North American grocery. EAN followed in Europe by
adding a thirteenth digit to the front, which is the whole of the difference: a
UPC-A is an EAN-13 whose leading digit is zero. 036000291452 and
0036000291452 are the same trade item, and the bar patterns a scanner sees are
the same patterns.
That mattered enormously when tills could only handle twelve digits. It stopped mattering with the 2005 Sunrise, by which point North American point-of-sale systems were required to accept EAN-13 as well. Today a scanner anywhere reads both, and the practical rule is short: print the number GS1 gave you, in the format its length implies.
Digits, and the digit you do not supply
| EAN-13 | UPC-A | |
|---|---|---|
| Total digits | 13 | 12 |
| You enter | 12 (or a full 13) | 11 (or a full 12) |
| Check digit | Modulo 10, computed for you | Modulo 10, computed for you |
| Nominal size at 100% | 37.29 × 25.93 mm | 37.29 × 25.91 mm |
| Magnification range | 80%–200% | 80%–200% |
| Standard | ISO/IEC 15420 + GS1 | ISO/IEC 15420 + GS1 |
The last digit of both is a modulo 10 check digit computed from the ones before it, which is why the barcode generator accepts twelve digits for an EAN-13 and eleven for a UPC-A and fills in the last one itself. Paste the complete number if you have it and it will be validated instead.
The arithmetic is worth knowing, because it catches transcription errors before
a printer does. Weight the data digits alternately by 1 and 3 from the left, sum
them, and subtract from the next multiple of ten. For the EAN-13 data
400638133393:
4×1 + 0×3 + 0×1 + 6×3 + 3×1 + 8×3 + 1×1 + 3×3 + 3×1 + 3×3 + 9×1 + 3×3 = 89
90 − 89 = 1 → 4006381333931
UPC-A works identically with the weights starting at 3, because the twelve-digit
number is the thirteen-digit one with its leading zero stripped. For
03600029145: the weighted sum is 58, so the check digit is 2, giving
036000291452.
If your supplier sends you a number whose check digit does not agree, do not print it. Something was mistyped, and the wrong product will ring up at the till.
What the prefix does and does not mean
The leading digits identify the GS1 member organisation that issued the company prefix. They are widely described as a country code, and that is close enough to true to be actively misleading.
| Prefix | Issued by |
|---|---|
| 000–139 | GS1 US and Canada |
| 020–029, 040–049 | Restricted distribution — in-store and internal use |
| 300–379 | GS1 France |
| 400–440 | GS1 Germany |
| 450–459, 490–499 | GS1 Japan |
| 500–509 | GS1 UK |
| 690–699 | GS1 China |
| 977 | Periodicals — ISSN |
| 978, 979 | Books — ISBN, and 9790 for printed music |
A product carrying a 40 prefix was registered through GS1 Germany by a company with a German GS1 membership. It says nothing about where the item was manufactured, and a British company that registered with GS1 Germany would carry it too. Anyone using the prefix to infer a country of manufacture is reading something the number does not encode.
The 020–029 and 040–049 ranges are the exception worth remembering: they are reserved for restricted distribution, meaning numbers a shop assigns itself for its own shelves. Nothing leaving your premises should use them.
You cannot invent the number
This is the part that stops most projects. A retail GTIN comes from a GS1 company prefix, licensed to you by the GS1 member organisation in your country, and article references are allocated from within that prefix. There is no self-service route, and a number you make up will either be rejected by the retailer’s onboarding or collide with a genuine product somewhere in the world — which is considerably worse than rejection, because it fails silently at somebody else’s till.
Marketplaces enforce this too: Amazon and most European marketplaces require a GTIN and check it against the GS1 registry. Start at gs1.org, which will route you to your national member organisation.
A generator produces a technically valid symbol from whatever digits you type. That is not the same as a number that works in a shop, and this site’s FAQ says so in as many words.
The smaller and the bigger symbol
Two variants exist for cases where the standard symbol does not fit.
UPC-E is a UPC-A with runs of zeros squeezed out, printed in about half the width — 22.11 mm against 37.29 mm at 100%. The till expands it back to the full twelve digits before the point-of-sale system sees it, so the product record is unchanged. It only works on numbers with the right shape: the zeros have to fall in the right places, and only number systems 0 and 1 are eligible. If your UPC-A does not compress, you print the full symbol or you choose a different article reference. On the EAN side the equivalent is EAN-8, which is a separately allocated short number rather than a compression of a long one, and GS1 issues it sparingly.
ITF-14 goes on the outer case, not on the item. It encodes a GTIN-14: an indicator digit for the packaging level, the item’s thirteen digits without their check digit, and a fresh check digit. It uses much wider bars and a bearer bar — the heavy frame around the symbol — because it is printed straight onto corrugated board, where ink spread would destroy an EAN-13. A case of twelve gets an ITF-14; the tins inside it keep their EAN-13.
What to use when it is not for a till
If the barcode never crosses a retailer’s counter — stock locations, asset tags, internal part numbers, an event ticket, a personal project — Code 128 is the answer. It takes any ASCII string, nobody allocates the numbers, and it is denser than any of the retail formats for the same digits. Choosing a retail symbology for internal work buys you a fixed length, a registration requirement and no benefit whatsoever.
| Use | Format | Digits | Registration |
|---|---|---|---|
| Retail item, most of the world | EAN-13 | 13 | GS1 |
| Retail item, North American number | UPC-A | 12 | GS1 |
| Small North American pack | UPC-E | 8 | GS1 (as UPC-A) |
| Small pack, EAN number | EAN-8 | 8 | GS1 |
| Shipping case | ITF-14 | 14 | Derived from the item GTIN |
| Anything internal | Code 128 | Any ASCII | None |
The inventory guide covers that last row properly. For everything above it, the sequence is: get the number from GS1, check the check digit, then open the generator.
Frequently asked
Is UPC-A the same as EAN-13?
How is an EAN-13 check digit calculated?
Does the first digit of a barcode tell you the country of origin?
Can I make up my own EAN or UPC number?
- ean-13
- upc-a
- gs1
- retail
- check digit
Make the code this guide describes
The generator runs in your browser — add a logo, pick colours, tag the link with UTM parameters and download a PNG or SVG. No account, no watermark.
Keep reading
-
Barcodes
Choosing a barcode for warehouse, asset and inventory labels
Which symbology to put on a bin, a carton, an asset tag or a 5 mm component, plus the X-dimension and print settings that decide whether it scans at all.
-
Printing
What size should a printed QR code be?
The distance-to-size rule that decides whether a printed QR code scans, the minimum millimetres per module, and the quiet zone people keep cropping off.
-
Barcodes
Barcode or QR code, and what converting one into the other really means
A QR code is a barcode. Converting between the two means re-encoding the data, not transforming an image — and at a checkout that distinction decides it all.