Comparison
QR code vs. barcode
They look similar, they get used for similar things, but they encode data very differently and have very different sweet spots.
People often use "barcode" and "QR code" as if they were two flavors of the same thing. They're not, and the distinction matters when you're choosing between them. Both are optical machine-readable codes, but they're built for different jobs and scan with different kinds of hardware.
What "barcode" usually means
When most people say "barcode," they mean a 1D linear barcode — a row of vertical black bars of varying widths. The most common 1D barcode formats:
- UPC-A / EAN-13 — the codes on grocery packaging.
- Code 128 — common on shipping labels, boarding passes, and warehouse inventory.
- Code 39 — older, used in industrial and military applications.
1D barcodes encode data along one axis. The vertical dimension is just for redundancy — laser scanners use it to tolerate small angle variations.
There's also a category of 2D barcodes— QR codes (Denso Wave), Data Matrix (industrial), Aztec (transit tickets), PDF417 (driver's licenses, boarding passes). These encode data in both dimensions and hold far more per unit of area.
Capacity
- UPC-A: 12 numeric digits.
- Code 128: up to ~80 alphanumeric characters in practice.
- QR code (version 40, level L): ~7,000 numeric or ~4,300 alphanumeric characters. Practically unlimited for URL use.
For everyday URLs, this means a 1D barcode is far too restrictive. You'd have to encode an opaque ID and look it up in a database. QR codes encode the URL directly.
Scanning hardware and angle tolerance
1D barcodeswere designed for laser scanners — the red-line scanners at grocery checkouts. The laser sweeps across the bars and measures their widths. They work perfectly when the laser's sweep is roughly perpendicular to the bars; they fail at extreme angles.
QR codes were designed for camera-based scanners (originally CCD imagers, now smartphone cameras). The whole image is captured at once and decoded in software. They tolerate substantial angle variation, partial damage, and even some warping.
This difference is the practical reason QR codes won the consumer space: every smartphone has a camera; almost no one owns a laser scanner.
Error correction
1D barcodes have minimal error correction. A scratch across the bars often kills the scan; the user retries.
QR codes use Reed–Solomon error correction at four selectable levels (L, M, Q, H), tolerating 7%–30% of the code being damaged or obscured. That's why you can put a logo in the middle of a QR code; you can't do that with a 1D barcode.
Print and scan economics
- 1D barcodesprint smaller (a UPC fits in ~3 cm) and scan extremely fast on dedicated hardware. They're ideal for high-throughput situations like retail checkout, where every millisecond counts and the scanner is purpose-built.
- QR codesneed a slightly larger area to be reliable on smartphones (~1.5 cm minimum) and decode slightly slower in software. They're ideal for consumer-facing situations where the user is the scanner and a phone camera is the hardware.
Use case decision tree
Use a 1D barcode when…
- You're building a checkout, warehouse, or inventory system where dedicated scanners are already deployed.
- The data you encode is short and structured (an SKU, a shipping ID, a serial number).
- You need maximum scan throughput in a controlled environment.
Use a QR code when…
- The user is a person with a smartphone, not an employee with a barcode scanner.
- You're encoding a URL, contact details, WiFi credentials, or any data over ~30 characters.
- You want the code to remain readable after some wear or with a logo embedded.
- You don't want to invest in dedicated scanning hardware.
Use both when…
Many products carry both: a UPC for retail checkout and a QR code for the consumer to scan for product information, registration, or rebates. They serve different audiences and don't conflict — the UPC is for the cashier's laser scanner, the QR is for the customer's phone.
What about Data Matrix and Aztec?
Both are 2D codes like QR. Data Matrix squeezes more data into less area than QR — it's the code stamped onto integrated-circuit chips and surgical instruments. Aztec tolerates poor printing better and is the standard for European train tickets.
For consumer-facing URL encoding, QR is the dominant format because phones have built-in support and users recognize it. For specialized industrial use, Data Matrix and Aztec each have niches where they outperform.
The takeaway
1D barcodes are a 50-year-old technology optimized for laser-scanner checkout. QR codes are a 30-year-old technology optimized for camera-based scanning. They're both still useful — just in different lanes. If your user is a person holding a phone, you want a QR. If your user is a scanner gun on a checkout counter, you want a barcode.
Need a QR code? Generate one for free in seconds.
Frequently asked questions
Are QR codes a kind of barcode?
Yes — QR codes are a type of 2D barcode. The word 'barcode' colloquially refers to traditional 1D barcodes (like UPCs on groceries), which encode data along a single axis. QR codes encode data in two dimensions and hold far more.
Can my phone scan a regular barcode?
Most modern phones can scan UPC and Code 128 barcodes, though support varies by app. The default iPhone Camera and Google Lens both handle common 1D formats, but specialized barcode types may need a dedicated scanner app.
Why does retail still use barcodes instead of QR codes?
Speed and existing infrastructure. Laser scanners read 1D barcodes faster than camera-based scanners read QR codes, and every grocery store has invested in 1D-compatible hardware. There's no benefit to switching when the existing system works.
Can a QR code do everything a barcode can?
From a data-encoding perspective, yes — QR codes can encode anything 1D barcodes can, and far more. The reason businesses still use 1D barcodes is the hardware deployed at scanning points, not a limitation of QR.
Which is more durable?
QR codes by a wide margin. Built-in error correction lets QR codes survive scratches, dirt, partial obscurity, and even logo overlays. 1D barcodes have effectively no error correction — a single scratch across the bars can kill the scan.
Should I print both on my product?
Often yes. Use a UPC barcode for retail checkout and a QR code on a different panel for consumers to scan for product info, registration, or marketing. They serve different audiences and don't compete for space.
Make a free QR code
For URLs, contact info, signage, packaging — anywhere a phone is the scanner.
Open the generator