Barcode types: which one should you use?

There are dozens of barcode types, but almost every job is done by one of about ten. Here's what each is for, with a quick way to choose.

By the BarcodePilot team · Updated

KarTrak, an early barcode used on American railway wagons from the late 1960s
KarTrak, an early barcode used on American railway wagons from the late 1960s.

Choose in 30 seconds

  1. Selling a product in shops or on marketplaces? Use the code GS1 gave you: UPC-A (US, Canada) or EAN-13 (everywhere else). Books use an ISBN barcode.
  2. Labelling cartons for distribution? ITF-14, or GS1-128 if you need batch, expiry or an SSCC.
  3. Labelling your own stock, assets or documents? Code 128, unless a system asks for Code 39.
  4. Lots of data in a small space, or marking parts? Data Matrix.

Linear (1D) and 2D barcodes

Linear barcodes store data in the widths of bars and spaces, read across in one line. Every scanner reads them, including cheap laser scanners. But they hold little data: a number, or a short code.

2D barcodes store data in a grid or in stacked rows. They hold far more in less space and survive damage thanks to error correction, but need an imaging scanner or a phone camera.

Container cranes at the Port of Southampton
Container cranes at the Port of Southampton.

All the main types compared

TypeHoldsMain use
UPC-A12 digitsRetail products, US and Canada
UPC-E8 digits (compressed UPC-A)Small packs, US
EAN-1313 digitsRetail products, worldwide
EAN-88 digitsSmall packs, worldwide
ISBN (Bookland EAN)13 digits + optional priceBooks
ITF-1414 digitsShipping cartons
GS1-128GS1 data with AIs, up to 48 charactersPallets, cases, SSCC labels, batch and expiry
Code 128Any ASCII textSKUs, inventory, shipping, FBA labels
Code 39A–Z, 0–9, 7 symbolsAsset tags, badges, automotive, defence
CodabarDigits, 6 symbolsLibraries, older lab systems
Data MatrixUp to ~2,300 charactersParts marking, medicines, electronics
PDF417Up to ~1,800 charactersDocuments, shipping, boarding passes
QR CodeUp to ~4,300 charactersLinks, Wi-Fi, marketing; GS1 Digital Link on products
Aztec CodeUp to ~3,000 charactersTickets and boarding passes
GS1 DataBarGTIN, or GTIN plus weight, price, datesFresh produce, small items, coupons
Code 93A–Z, 0–9, 7 symbols, 2 check charactersLogistics, Canada Post
Interleaved 2 of 5Even-length digitsWarehouses, industrial systems
Intelligent Mail31 digits, 4-stateUSPS letters and flats

Retail barcodes need GS1 numbers

UPC, EAN, ISBN, ITF-14 and GS1-128 carry numbers from the GS1 system. The barcode itself is free to make, but the number has to come from GS1 (or, for books, an ISBN agency). Code 128, Code 39, Codabar, Data Matrix and PDF417 can carry any data you like, so use them for your own codes.

What about QR codes?

QR codes are 2D codes best known for linking phones to websites. They're great for marketing but aren't used for product identification at the till, at least not yet. GS1 is moving retail toward 2D codes, including QR codes carrying GS1 Digital Link web addresses, through its "Sunrise 2027" programme. For now, a UPC or EAN is still what tills expect. You can make both here: a plain QR code for links, or a GS1 Digital Link QR that carries your GTIN.

Pallet racking in a distribution warehouse
Pallet racking in a distribution warehouse.

Questions

  • For retail products, UPC-A and EAN-13. For everything else, Code 128.

  • Code 128. It holds letters and numbers, is compact and every scanner reads it.

  • 1D barcodes store data in bar widths and hold a short code; 2D barcodes store data in a grid, hold much more and need an imaging scanner or camera.