A Guide to Barcodes in Retail and Logistics
Barcodes predate QR codes by decades and remain the backbone of retail and logistics for a simple reason: they solve a narrower problem extremely well, with hardware built specifically around reading them fast.
How a linear barcode encodes data
A traditional barcode (like CODE128 or UPC) represents data as a sequence of parallel bars and spaces of varying widths, read by a laser or camera scanning across a single line. Each character maps to a specific pattern of bar/space widths, and a checksum digit catches most scanning errors.
Why barcodes still beat QR codes for many retail uses
| Factor | Linear barcode | QR code |
|---|---|---|
| Scan speed with dedicated hardware | Extremely fast, single-axis laser scan | Slightly slower, needs 2D image capture |
| Data capacity | Limited, usually just an ID number | Much higher, can hold URLs and text |
| Print space needed | Compact horizontally | Needs a square area |
| Damage tolerance | Low — a scratch across the bars can break a scan | High, built-in error correction |
Retail checkout systems are built around fixed-position laser scanners optimized for the linear format, and a product barcode only needs to hold a lookup ID (like a UPC/EAN number) — the actual product data lives in a database, looked up by that ID. QR codes make more sense when the payload itself needs to carry more information, like a URL.
Common barcode formats
- UPC/EAN. The format used on most retail product packaging worldwide, encoding a fixed-length numeric product ID.
- CODE128. A flexible format supporting letters, numbers, and symbols, widely used in shipping, logistics, and inventory management where more than just digits need encoding.
- CODE39. An older, simpler format still used in some industrial and inventory contexts.
Where the checksum digit matters
Most barcode formats include a checksum digit calculated from the other digits, letting a scanner detect (though not always correct) a misread. This is why a barcode occasionally fails to scan and needs a re-try rather than silently recording the wrong product — the checksum catches the mismatch.
Frequently asked questions
Common causes include a scratched or crumpled label, poor print contrast, or the scanner's angle relative to the bars — unlike QR codes, linear barcodes have little built-in error correction for damage.
CODE128 is a common choice for shipping and logistics because it supports letters and numbers, not just digits, accommodating tracking numbers and mixed identifiers.
Conclusion
Barcodes and QR codes aren't competitors so much as tools suited to different jobs — barcodes for fast, hardware-optimized lookups against a database; QR codes for carrying richer data directly. Most retail and logistics operations still rely on both.
Generate one with the Barcode Generator.