1D vs 2D Barcodes: Key Differences and When to Use Each
QR & Barcode Standards Specialist · Last updated Jul 2, 2026
Not all barcodes are created equal, and the biggest dividing line runs between one-dimensional (1D) and two-dimensional (2D) codes — a choice that shapes how much data you can store, how it scans, and how much space it takes.
Ready to generate your code?
Create high-quality, professional QR codes and barcodes for your business completely free.
Create Your Free Code NowWhat is a 1D barcode?
One-dimensional, or linear, barcodes store data in the widths and spacing of parallel vertical bars that a scanner reads horizontally. They hold a limited amount of information — typically 20 to 25 characters — usually a number that points to a record in a database. Familiar examples include Code 128, EAN-13 and UPC-A.
What is a 2D barcode?
Two-dimensional codes store data both horizontally and vertically, using patterns of squares, dots or rings. This lets them pack hundreds or thousands of characters — even URLs, contact cards or structured records — into a small footprint. Common examples are the QR Code, Data Matrix, PDF417 and Aztec Code.
Data capacity
This is the clearest difference. A 1D code holds a few dozen characters at most, while a single QR Code stores around 3,000 bytes and Data Matrix up to 2,335 characters. If you need more than a short identifier, 2D is the only realistic option.
Size and space
Because 2D codes store more data per square millimetre, they are ideal where space is tight — on electronic components or medical devices. A 1D code carrying the same data would have to grow physically wide to fit.
Error correction
Most 1D codes rely on at most a single check digit. 2D codes build in strong error correction (such as Reed–Solomon) that can recover the data even when a significant portion of the symbol is scratched, smudged or partly covered.
Scanning
1D codes need a laser or linear imager and must be reasonably well aligned. 2D codes require a camera-based (area) imager or a smartphone, but read from any angle and even off a screen. For a full breakdown, see Barcode Scanners Explained.
When to use which
Choose 1D for straightforward retail checkout and inventory, where a short number links to a database and legacy laser scanners are already in place. Choose 2D when you need rich data, mobile scanning, marketing links, very small labels, or robust error correction.
The direction of travel
Retail is steadily moving toward 2D at the checkout under GS1's "Sunrise 2027" initiative, so for most new consumer-facing projects a QR Code is the safe, future-proof choice. Explore every option in our barcode types guide.