A QR code is a type of barcode, just a newer, two-dimensional one. But when people say "barcode", they usually mean the familiar row of black and white lines on a cereal box. Those two kinds of codes were designed for very different jobs, and picking the right one saves a lot of trouble.
This guide explains how they differ, what each is good at, and how to choose.
The short answer
- Traditional (1D) barcodes store a short string, usually a product number, in a single row of bars. They are made for fast scanning at checkout and in warehouses, and the number usually points to information in a database.
- QR codes (2D) store data in a square grid. They hold far more, can carry a full web link, WiFi login or contact card, can be read from any angle and still work when partly damaged.
- For customers with phones, use a QR code. For retail checkout and inventory systems, use the barcode format your retailer or system requires.
How each one stores data
1D (linear) barcodes
A linear barcode stores information in the widths of its bars and spaces, read in one direction, left to right. The height of the bars does not carry data; it just gives the scanner a bigger target.
Common types include:
- UPC-A: 12 digits, widely used on retail products in the U.S. and Canada.
- EAN-13: 13 digits, the international equivalent used in many other countries.
- Code 128: can encode letters, numbers and symbols, and is common on shipping labels.
- Code 39: encodes uppercase letters, digits and a few symbols; often used for ID badges and inventory.
Because they hold only a short string, linear barcodes usually work as a key to a database. The checkout system scans a product number and looks up the name and price.
2D barcodes
A two-dimensional code stores data both horizontally and vertically, in a grid of small squares (called modules). That gives it much more room.
The QR code ("Quick Response") was created in 1994 by Denso Wave, a Japanese company, originally to track automotive parts. Other common 2D codes include:
- Data Matrix: very compact; often used to mark small parts and on healthcare and pharmaceutical packaging.
- PDF417: a stacked code that looks like many tiny barcodes in rows; used on many U.S. and Canadian driver's licenses.
- Aztec: used on some boarding passes and transit tickets.
Make a free QR code for a link, WiFi or contact card — generated in your browser.
Open the free QR code generator →Side-by-side comparison
| Feature | 1D barcode (e.g., UPC) | QR code |
|---|---|---|
| Shape | Row of vertical lines | Square grid of modules |
| Typical data | A product or tracking number | Links, text, WiFi, contacts, phone numbers |
| Capacity | Short: UPC-A holds 12 digits | Up to 7,089 digits or 2,953 bytes in the largest version |
| Scanning direction | Mostly along one axis | Any angle, thanks to three corner finder patterns |
| Damage tolerance | A check digit detects errors, but damaged bars often fail | Built-in error correction can recover from partial damage |
| Read by phone camera | Usually needs a scanner app | Built into most phone cameras |
| Read by laser checkout scanner | Yes | No; needs a camera-based (imaging) scanner |
| Best for | Retail checkout, inventory, shipping | Marketing, menus, signs, payments, sharing info |
For the details on QR capacity, see how much data a QR code can hold.
Error correction: why QR codes are tougher
Most linear barcodes include a check digit. It lets the scanner detect a misread, but it cannot rebuild missing information. If part of the bars is scratched or smudged, the scan often fails.
QR codes include Reed-Solomon error correction, which stores extra recovery data. Depending on the level you choose, a QR code can still be read with roughly 7% to 30% of it damaged or covered. That is also what makes it possible to place a small logo in the middle. Learn more in QR code error correction levels and can a QR code have a logo?.