Barcode Types Explained: EAN-13, UPC, Code 128, ITF-14, QR and More
A guide to the most common barcode symbologies, what each encodes, where it is used, check digits, GS1 numbers and how to choose the right barcode.
· 5 min read
Barcodes look alike to most people — black bars on a white label — but dozens of different symbologies exist, each designed for specific data, industries and printing conditions. Choosing the wrong one can mean retailers rejecting your products, warehouse scanners failing to read cartons or labels that become unreadable after a few days in transit. This guide explains the barcodes you are most likely to encounter, what they can store and where each one belongs.
Linear (1D) versus 2D barcodes
Linear barcodes encode data in the widths of parallel bars and spaces. They are read by laser or camera scanners along a single line, are cheap to print and have decades of infrastructure built around them. Capacity is small: usually up to 20–40 characters.
2D barcodes such as QR codes and Data Matrix store data in a grid of modules, holding hundreds or thousands of characters and tolerating damage through error correction. They require camera-based (imaging) scanners.
Retail barcodes: EAN and UPC
EAN-13
The European Article Number, now officially GTIN-13, is the standard product barcode almost everywhere except North America. It encodes exactly 13 digits:
- The first digits form the GS1 company prefix, assigned to a brand owner by their national GS1 organisation.
- The following digits identify the specific product.
- The last digit is a check digit calculated from the others.
The prefix's first two or three digits historically indicate the GS1 member organisation that issued it (for example 400–440 for Germany, 690–699 for China), not the country where the product was made.
UPC-A
The Universal Product Code dominates in the United States and Canada. It encodes 12 digits and is effectively an EAN-13 with a leading zero; modern point-of-sale systems worldwide read both.
EAN-8 and UPC-E
Compressed versions for small packages such as chewing gum or cosmetics. EAN-8 numbers are allocated separately by GS1 and are scarce; UPC-E compresses certain UPC-A numbers by removing zeros.
How check digits work
For EAN-13, multiply the first 12 digits alternately by 1 and 3, sum the results, and choose the digit that brings the total to the next multiple of 10. For 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
check digit = 90 − 89 = 1 → 4006381333931
The check digit catches nearly all single-digit errors and most swapped adjacent digits. A barcode generator that validates check digits prevents printing labels that scanners will reject.
Getting retail numbers
You cannot invent EAN or UPC numbers for products sold through retailers. They must come from your GS1 membership, which links the numbers to your company in global databases used by retailers and marketplaces. Numbers bought from unofficial resellers are often rejected by major retailers and marketplaces because the registered owner does not match your brand.
Logistics barcodes
ITF-14
Interleaved 2 of 5 encoding a 14-digit GTIN for outer cartons and cases. Its wide bars tolerate printing directly on corrugated cardboard, where ink spreads. You will usually see it surrounded by a thick bearer bar that prevents partial scans.
GS1-128
A Code 128 variant with standardised application identifiers that label each piece of data: (01) for GTIN, (10) batch number, (17) expiry date, (00) serial shipping container code. Pallet labels in global supply chains use it to carry several data elements in one symbol.
General-purpose barcodes
Code 128
The workhorse for internal use: asset tags, shipping labels, tickets, library systems and manufacturing. It encodes all 128 ASCII characters, switches automatically between character sets to stay compact, and includes a mandatory checksum. For alphanumeric data it is significantly denser than Code 39. If you need a linear barcode for your own system and have no industry requirement, Code 128 is almost always the right answer.
Code 39
One of the oldest alphanumeric symbologies. It supports uppercase letters, digits and a few symbols, is self-checking without a check digit and is easy to decode. Its low density makes labels wide. It remains common in the automotive and defence industries and in older systems.
Codabar
Developed in the 1970s and still used by libraries, blood banks and some courier systems. It encodes digits and a handful of symbols, with start and stop characters A–D.
MSI Plessey and Pharmacode
MSI is used mainly for warehouse shelf labelling. Pharmacode encodes a single integer for packaging control in the pharmaceutical industry, verifying that the right leaflet or box is used on a production line. Neither is suitable for general data.
2D barcodes
QR code
Designed by Denso Wave in 1994 for tracking automotive parts, now the universal consumer 2D code for URLs, payments, tickets and Wi-Fi credentials. Best practices for size, contrast and error correction are covered in our QR code guide.
Data Matrix
Compact and highly reliable at very small sizes, Data Matrix is used to mark electronic components, surgical instruments and pharmaceuticals; regulations such as the EU Falsified Medicines Directive require it on medicine packs.
PDF417
A stacked linear code that holds about 1 KB of data. You will find it on US driver's licences, boarding passes and shipping documents.
GS1 Digital Link and 2D at retail
The retail industry is moving towards 2D codes at checkout through the GS1 "Sunrise 2027" initiative. A single QR code in GS1 Digital Link format can carry the GTIN for the till plus batch, expiry and a link to product information for consumers. EAN/UPC barcodes will coexist for years, but new packaging increasingly carries both.
Choosing the right barcode
| Need | Recommended |
|---|---|
| Product sold in retail stores | EAN-13 or UPC-A from GS1 |
| Outer carton of retail products | ITF-14 or GS1-128 |
| Internal asset tags, tickets, IDs | Code 128 |
| Lots of data or a URL | QR code |
| Tiny parts, high reliability | Data Matrix |
| Legacy system compatibility | Whatever the system already uses (Code 39, Codabar) |
Printing tips
- Print at 100% scale. EAN-13 has a nominal size of 37.29 × 25.93 mm; you can scale between 80% and 200%, but shrinking below that or truncating the bar height reduces reliability.
- Use vector output. SVG or PDF keeps bar edges exact; scaling a low-resolution PNG makes bars uneven.
- Keep quiet zones. Linear barcodes need clear space on both sides, typically ten times the narrowest bar width.
- Choose colours carefully. Laser scanners use red light, so red, orange and yellow bars disappear. Dark bars on a light background are safest.
- Verify before mass printing. Scan proofs with the actual scanners used at the destination — retail POS, warehouse handhelds or phone apps.
Summary
Use GS1-issued EAN-13 or UPC-A numbers for retail products, ITF-14 or GS1-128 for logistics, Code 128 for your own systems and QR or Data Matrix when you need more data or smaller codes. Validate check digits, print at proper size with quiet zones, and test with the scanners your partners actually use.