Barcode types compared


Barcodes fall into two families. Linear (1D) barcodes, the familiar bars, hold a short number or code and are read by almost every scanner, including the laser scanners at shop tills. 2D codes such as QR codes and Data Matrix hold far more data in a smaller space, but need a camera-based scanner. The right choice depends on what you’re labelling and who scans it.

Which barcode should I use?

Situation Best choice Notes
Products sold in shops (Europe and most of the world) EAN-13 Needs a GS1 number (GTIN)
Products sold in shops (USA and Canada) UPC-A Needs a GS1 number (GTIN-12)
Very small retail packs EAN-8 or UPC-E Only for numbers allocated or suitable for the short form
Your own stock, assets, files or parcels Code 128 Any letters and numbers; no registration
A system or customer that specifies it Code 39 Older and wider; upper-case letters, digits and a few symbols
A web link, Wi-Fi details or contact card A QR code Phones scan QR codes with their built-in camera

Linear barcodes compared

Feature EAN-13 UPC-A Code 128 Code 39
Characters 13 digits 12 digits All letters, digits, symbols A–Z, 0–9, space, - . $ / + %
Check digit Mod 10 (required) Mod 10 (required) Mod 103 (automatic) Optional mod 43
Main use Retail worldwide Retail, North America Logistics, inventory, internal Industry, government, legacy
Number needed from GS1 Yes Yes No No
Width for the same data Fixed Fixed Compact Wide

Why the check digit matters

EAN and UPC barcodes end in a check digit calculated from the other digits. If a digit is misprinted or misread, the check fails and the scanner rejects the read instead of ringing up the wrong product. Our generators calculate it for you, or verify yours and offer the correct value if it doesn’t match. Code 128 adds its own check character automatically, so you never see it.

1D or 2D?

Use 1D where shop tills, handheld laser scanners or existing systems must read the code, and the data is short. Use 2D where people will scan with phones, where you need to fit lots of data into a small space, or where the code must survive damage (2D codes include error correction).

Generators

Sources

  1. GS1 UK, GS1 UK. Accessed 2026-11-29.
  2. MDN Web Docs, Barcode Detection API (supported formats). Accessed 2026-11-29.

Reviewed on by Richard Pryn.