Guide No sign-up needed

Barcode Types Explained

A quick comparison of the common 1-D barcode formats and where each one fits.

On this page
  1. Retail product codes
  2. General-purpose codes
  3. Shipping and specialty codes
  4. Comparison at a glance
  5. When a linear code runs out of room
  6. Which should you choose?

Retail product codes

UPC-A (12 digits) is the North American retail standard; EAN-13 (13 digits) is its global counterpart; EAN-8 (8 digits) is the compact version for small packages. All three carry a check digit and require an official GS1 number for real retail use — generating an image doesn't register a product.

General-purpose codes

Code 128 is dense and flexible, encoding digits, letters and ASCII symbols — the workhorse of shipping and logistics. Code 39 is older and lower-density but very widely supported, popular for IDs, badges and industrial labels.

Shipping and specialty codes

ITF-14 encodes a 14-digit GTIN on shipping cartons, often with heavy bearer bars. Codabar is a self-checking code still used by libraries, blood banks and labs.

Comparison at a glance

FormatDataTypical use
UPC-A12 digitsUS/Canada retail
EAN-1313 digitsGlobal retail
EAN-88 digitsSmall retail packs
Code 128ASCII textShipping, logistics
Code 39A–Z, 0–9, few symbolsIDs, badges, industry
ITF-1414 digitsShipping cartons
CodabarDigits + few symbolsLibraries, labs

When a linear code runs out of room

Every format above stores its data across a single line of bars, which caps capacity at a short number or string. Once you need more — a batch, an expiry date and a serial together, or a whole record — you need a two-dimensional symbology that stores data in both directions.

FormatBest atTypically used for
Data MatrixVery small marksPart marking, electronics, instruments
GS1 DataMatrixStructured GS1 dataMedicine packs, medical devices
PDF417Large payloads, laser-readableDriving licences, boarding passes
Aztec CodeNo quiet zone neededRail tickets, transport passes
QR CodePhone camerasAnything the public scans

The practical split: QR for the general public, because every phone camera recognises it without extra software. Data Matrix when the mark has to be tiny. PDF417 or Aztec when an existing standard in transport or identity documents requires them.

Which should you choose?

For retail, use the code your market expects (UPC or EAN) with a registered GS1 number. For internal tracking, Code 128 offers the best density; choose Code 39 or Codabar when legacy compatibility matters. If the data outgrows a single line, move to Data Matrix — or to QR if people will scan it with their own phones.

Written and maintained by the QRBarcodeTools Editorial Team · Last reviewed 2026-08-02 · How we write and check these guides

Try it with the tool

Read next

Browse all 18 guides →