Barcode Types Explained: 1D, 2D and When to Use Each
Barcodes look like a single technology, but there are dozens of incompatible symbologies — each with its own shape, capacity and job. Picking the right one matters: a retail scanner will simply ignore a Code 128 on a chocolate bar, and a QR code printed at 5 mm will defeat every phone camera in the room. This guide walks through the families you will actually meet.
One-dimensional (1D) barcodes
1D codes are the familiar stripes. They store a short payload — typically 8 to 50 characters — read horizontally by laser or camera. The workhorses:
- EAN-13 / UPC-A — the retail standard encoded on virtually every consumer product worldwide (GTIN-13 and GTIN-12).
- Code 128 — logistics and shipping labels; full ASCII, dense, and the basis of GS1-128 with application identifiers.
- Code 39 — industrial and defence legacy; larger and less dense, but prints and reads forgivingly.
- ITF-14 — the crossed-bar code on corrugated shipping cartons, encoding the GTIN-14.
Two-dimensional (2D) codes
2D codes store data in both dimensions, reaching hundreds of characters or more, and carry built-in error correction so a partially damaged symbol can still decode.
- QR Code — the consumer standard for URLs, payments and marketing; three corner finder patterns make it readable from any angle.
- Data Matrix — the small-parts champion in electronics, medical devices and automotive; scales down to a few millimetres.
- PDF417 — stacked rows for IDs, driving licences and transport documents needing 1–2 KB.
- Aztec — compact code popular for airline boarding passes and tickets, readable even off poor screens.
How to choose
- Selling in retail? You need a licensed GS1 number rendered as EAN-13/UPC-A — do not invent the digits.
- Marking tiny parts? Data Matrix wins on size and survives dot-peen marking.
- Linking print to a web page or Wi-Fi? QR Code — every modern phone camera scans it natively.
- Government ID, boarding pass or ticket? PDF417 or Aztec, matching the issuing system.
Generate any of them locally
QrDeco renders 87 symbologies — all of the above and more — entirely in your browser, with SVG/PNG/PDF export. Nothing is uploaded, so test data and real GTINs are equally safe to run through it.