Skip to content

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.

by Kyllian 6 min read

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-13UPC-A
Total digits1312
You enter12 (or a full 13)11 (or a full 12)
Check digitModulo 10, computed for youModulo 10, computed for you
Nominal size at 100%37.29 × 25.93 mm37.29 × 25.91 mm
Magnification range80%–200%80%–200%
StandardISO/IEC 15420 + GS1ISO/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.

PrefixIssued by
000–139GS1 US and Canada
020–029, 040–049Restricted distribution — in-store and internal use
300–379GS1 France
400–440GS1 Germany
450–459, 490–499GS1 Japan
500–509GS1 UK
690–699GS1 China
977Periodicals — ISSN
978, 979Books — 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.

UseFormatDigitsRegistration
Retail item, most of the worldEAN-1313GS1
Retail item, North American numberUPC-A12GS1
Small North American packUPC-E8GS1 (as UPC-A)
Small pack, EAN numberEAN-88GS1
Shipping caseITF-1414Derived from the item GTIN
Anything internalCode 128Any ASCIINone

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?
Structurally, almost. A UPC-A is an EAN-13 whose leading digit is zero, and the two are the same symbology with the same bar patterns. Any scanner that reads one reads the other, and North American point-of-sale equipment has been required to accept EAN-13 since 2005. The difference is administrative rather than technical.
How is an EAN-13 check digit calculated?
Take the twelve data digits and multiply them alternately by 1 and 3 from the left, so the first digit is weighted 1, the second 3, and so on. Add the results, then subtract the total from the next multiple of ten. For 400638133393 the weighted sum is 89, so the check digit is 1.
Does the first digit of a barcode tell you the country of origin?
No. The prefix identifies the GS1 member organisation that issued the company prefix, which usually corresponds to where the company registered rather than where the goods were made. A product with a 40 to 44 prefix was registered through GS1 Germany and may well have been manufactured anywhere in the world.
Can I make up my own EAN or UPC number?
Not for retail. Numbers are allocated by GS1 through a company prefix, and an invented one will either be rejected by the retailer or collide with a real product somewhere in the world. For internal stock, asset labels or a personal project, use Code 128 instead, which needs no registration at all.

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

← All guides