Which barcode do you actually need? It comes down to where it gets scanned. Products sold in shops use EAN-13 (worldwide) or UPC-A (mainly the US and Canada), with a number licensed from GS1. Outer cartons take ITF-14. For shipping labels, inventory and asset tags, Code 128 is the usual pick — it packs letters and numbers into a compact symbol — though you'll still find the older Code 39 in plenty of places. Below: a comparison of the common types, how check digits and quiet zones work, and when you actually need GS1 (and when you don't).
- EAN-13 and UPC-A are retail barcodes. The number inside (a GTIN) must come from GS1 if the product will be sold through shops or marketplaces.
- Code 128 is the best general-purpose barcode for your own labels: full ASCII text, compact and very reliable.
- ITF-14 marks cartons and cases; EAN-8 and UPC-E are short versions for small packs.
- EAN, UPC and ITF-14 end with a check digit calculated from the other digits, so most misreads are caught.
- Leave a blank quiet zone either side, use dark bars on a light background and test-scan before printing in bulk.
The common barcode types at a glance
| Type | Characters | Length | Typical use |
|---|---|---|---|
| EAN-13 | Digits | 13 (12 + check digit) | Retail products worldwide; books (ISBN as EAN-13) |
| UPC-A | Digits | 12 (11 + check digit) | Retail products in the US and Canada |
| EAN-8 | Digits | 8 (7 + check digit) | Very small retail packs |
| UPC-E | Digits | 8 (a compressed UPC-A) | Small packs in North America |
| ITF-14 | Digits | 14 (13 + check digit) | Outer cartons and cases in warehouses |
| Code 128 | All 128 ASCII characters | Variable | Shipping labels, inventory, asset tags, tickets; GS1-128 in supply chains |
| Code 39 | A–Z, 0–9, space, - . $ / + % | Variable | ID badges, industrial and automotive parts, defence logistics |
| Codabar | 0–9 and - $ : / . + | Variable | Older systems in libraries, blood banks and parcel services |
Every one of these is a one-dimensional, or "linear," barcode — the data lives in the widths of the bars and spaces, and a laser or camera scanner reads it in a single pass. Two-dimensional codes work differently: QR codes and Data Matrix pack data into a grid instead, hold far more of it, and can be read from any angle. More on those further down.
EAN-13 and UPC-A: retail barcodes
Walk into almost any supermarket and the barcode on the product in your hand is an EAN-13 or a UPC-A. Both encode a GTIN (Global Trade Item Number) — the number a shop's till looks up to find the product's name and price. The two are close cousins: a 12-digit UPC-A is just a 13-digit EAN-13 with a leading zero tacked on, and since 2005 retailers in the US and Canada have been expected to scan EAN-13 as well, so in practice either one works almost everywhere.
An EAN-13 number has four parts:
- GS1 prefix (the first two or three digits): shows which national GS1 organisation issued the number. It does not say where the product was made, a common myth: a product made in one country can carry a number licensed in another.
- Company prefix: identifies the brand owner who licensed the numbers.
- Item reference: chosen by the company for each product variant (each size, flavour or colour needs its own GTIN).
- Check digit: the last digit, calculated from the others.
Books work a bit differently: an ISBN has had 13 digits since 2007, always starting with 978 or 979, and gets printed as an EAN-13 barcode. EAN-8 and UPC-E exist for one reason — packs too small to fit a full barcode — and they're shortened versions of the same idea. EAN-8 numbers, for what it's worth, are allocated individually and pretty sparingly.
When you need GS1
Planning to sell through shops, supermarkets, pharmacies or most large online marketplaces? Then its EAN or UPC number has to be licensed from GS1 — the not-for-profit standards body behind retail barcodes — through your local GS1 member organisation. You get a company prefix, usually for an annual fee, and build GTINs out of it from there. Worth knowing: a barcode generator, ours included, only draws the barcode for a number you supply. It can't issue or register anything. Invent a number yourself, or buy cheap resold ones, and you risk clashing with another company's product outright — and plenty of retailers do check GTINs against the GS1 registry.
None of that applies, though, if the barcode never leaves your own system. Stock locations, internal SKUs, library or asset tags, event tickets, loyalty cards — skip GS1 entirely and use Code 128 instead.
ITF-14: cartons and cases
Warehouses don't deal in single items, they deal in boxes of them, and ITF-14 (Interleaved 2 of 5) is built for that: a 14-digit GTIN for the outer case. The first digit is a packaging indicator — it's what tells a box of 12 apart from a box of 24 of the same product — the next 12 digits usually repeat the product's own GTIN minus its check digit, and then a new check digit gets calculated over all 13. ITF-14 was built to tolerate printing straight onto corrugated cardboard, which is why you'll often see it surrounded by thick bearer bars; they stop a scanner from reading only part of the code by mistake.
Code 128: the general-purpose barcode
Code 128 can encode all 128 ASCII characters — letters, digits, punctuation, control characters, the works — which is exactly why it suits order numbers, serial numbers, tracking codes and short bits of text. Under the hood it switches between three code sets: A (upper case plus control characters), B (upper and lower case), and C, which crams two digits into every symbol and makes long numbers remarkably compact. A built-in check character (modulo 103) catches misreads along the way, and most generators tack it on automatically without you asking.
GS1-128 takes that same Code 128 symbology and applies it to pallet and shipping labels. It strings data fields together using Application Identifiers in brackets — (01) for the GTIN, (17) for a use-by date, (10) for a batch number — so one single barcode ends up carrying several pieces of information at once.
Code 39: simple and widely supported
Code 39 goes back to the 1970s and encodes 43 characters: upper-case letters, digits, space, and - . $ / + %. Each character stands alone, and the barcode starts and ends with an asterisk — simple to print, simple to decode, which is why it's stuck around so long for ID badges, industrial parts and defence logistics. There's a cost, though: Code 39 runs much wider than Code 128 for the exact same data. A modulo-43 check character is available but optional. For a new system, Code 128 is usually the smarter call; reach for Code 39 only when existing equipment or a customer specifically requires it.
How check digits work
EAN, UPC and ITF-14 all lean on the same GS1 modulo-10 check digit. The method: starting from the rightmost digit (before the check digit itself), multiply digits alternately by 3 and by 1, add up the results, and the check digit is whatever number brings that total up to the next multiple of ten: check digit = (10 − sum mod 10) mod 10.
Worked example (EAN-13): for 400638133393, from the right: 3×3 + 9×1 + 3×3 + 3×1 + 3×3 + 1×1 + 8×3 + 3×1 + 6×3 + 0×1 + 0×3 + 4×1 = 9 + 9 + 9 + 3 + 9 + 1 + 24 + 3 + 18 + 0 + 0 + 4 = 89. The next multiple of ten is 90, so the check digit is 1 and the full number is 4006381333931.
Worked example (UPC-A): for 03600029145 the weighted sum is 58, so the check digit is 2: 036000291452.
What does this actually buy you? It catches every single wrong digit, plus most cases where two neighbouring digits get swapped by accident. A scanner that hits a wrong check digit simply rejects the scan rather than ringing up the wrong product entirely. Don't want to do the arithmetic yourself? The barcode generator calculates the check digit for you, shows its working, and warns you if a number you've entered already has the wrong one attached.
Printing barcodes that scan
- Quiet zone: leave blank space on both sides. EAN-13 needs at least 11 modules (narrowest bar widths) on the left and 7 on the right; Code 128 and Code 39 need at least 10 modules. Text or a box edge too close is a common reason for failed scans.
- Size: the standard EAN-13 is about 37.3 mm wide (including quiet zones) by 25.9 mm high at 100%, and GS1 allows roughly 80% to 200% of that size. Shrinking the height (truncation) makes scanning harder.
- Contrast: dark bars (black, dark blue, dark green) on a white or light background. Red bars are invisible to many red-light laser scanners, and light bars on a dark background often fail.
- No stretching: scale proportionally and print at 100% (turn off "fit to page"), or the bar widths change.
- Resolution: use vector SVG for print layouts and high-resolution PNG for labels; blurry edges cause misreads.
- Test first: scan a printed sample with a phone app or the scanner you will use before printing a full run.
Barcodes vs QR codes
Linear barcodes are cheap, fast and read by basically every retail and warehouse scanner out there — their one real limit is that they only hold a short string. QR codes and other 2D codes go further: hundreds of characters, readable by any phone camera, and they still work even partly damaged, which is exactly why they're the right call for web links, Wi-Fi details or contact cards. Even retail is drifting toward 2D: GS1 is running an industry programme, often called Sunrise 2027, aimed at getting shop scanners to read 2D codes carrying a GTIN plus extras like batch and expiry dates. For now, though, retail products still need a linear EAN or UPC. Need a code for a link instead? Use the QR code generator.
Which barcode should you use?
- Selling a product in shops or on marketplaces: EAN-13 (or UPC-A in North America) with a GS1-licensed number.
- Cartons of that product: ITF-14 or GS1-128.
- Your own stock, assets, tickets or documents: Code 128.
- Equipment that only reads Code 39: Code 39.
- A link, text message or contact card for phones: a QR code.
Looking for more? There are additional free generators and converters in everyday tools.
Frequently asked questions
What is the difference between EAN and UPC?
UPC-A has 12 digits and is used mainly in the US and Canada; EAN-13 has 13 digits and is used worldwide. A UPC-A is really just an EAN-13 with a leading zero, so modern scanners read both without issue.
Do I need to buy barcodes from GS1?
For anything sold through retailers or most large marketplaces, yes — the EAN or UPC number has to be licensed from GS1. For internal use, though, like inventory or asset tags, you're free to create your own Code 128 barcodes with no GS1 involved at all.
Does the start of an EAN-13 show the country of origin?
No, that's a common mix-up. The first digits just show which national GS1 organisation issued the company prefix, not where the product was actually made.
Which barcode is best for inventory?
Code 128, hands down. It encodes letters and numbers, stays compact, carries a built-in check character, and gets read by virtually every scanner out there.
How is an EAN-13 check digit calculated?
Multiply the first 12 digits alternately by 1 and 3 (from the left — or equivalently 3 and 1 from the right), add them all up, and take whatever's needed to reach the next multiple of 10. For 400638133393 the sum works out to 89, so the check digit is 1.
Can a barcode store a website address?
Code 128 can technically hold a short URL in there, sure, but phones won't open it as a clickable link. For web addresses, a QR code is what you actually want.
Kommentare
Teilen Sie einen Tipp, stellen Sie eine Frage oder erzählen Sie, wie das Tool bei Ihnen funktioniert hat.