Turn over almost any packaged product and you will find the striped barcode that has been scanned at checkouts for decades. More and more packs now carry a square QR code as well. They look different and they are read by different machines, but they do the same basic job: carry data so a machine can read it.
This guide compares the two for people who make, pack and sell products, and explains why most retail packs will carry both for some time.
Two ways to store data
A barcode in the traditional sense, also called a linear or 1D barcode, stores data in one direction. The scanner reads the widths of bars and spaces from left to right. The height of the bars adds no extra data; it gives the scanner more places to cross the symbol.
A QR code is a 2D barcode: it stores data in two directions, as a grid of small dark and light squares called modules. The three large squares in the corners tell the reader where the code is and which way up it sits, so it can be read at any angle.
Both are data carriers. Neither is the product's identity. The number that identifies a retail product is the GTIN (Global Trade Item Number), and the same GTIN can be printed as a barcode, a QR code or both. That distinction is explained in GTIN vs barcode vs QR code vs serial number.
How much each can hold
On a retail pack, the familiar EAN-13 or UPC-A barcode carries just the GTIN: a short run of digits. There is no room for much else.
Because it uses two dimensions, a QR code holds far more data in a similar area. On a product that can mean the GTIN plus a batch number, an expiry date and a serial number, or a full web address. A QR code carrying a GS1 Digital Link does both at once: it writes the GTIN and any batch or serial data into a web address that a phone can open.
More data is not free, though. The more a QR code holds, the more modules it needs, and the larger it has to be printed to stay readable.
Who and what can read each one
This is the difference that matters most in practice.
- Laser scanners, still common at many checkouts and in warehouses, read linear barcodes only. They physically cannot read 2D codes.
- Imaging scanners take a picture of the code and can read both linear barcodes and 2D codes such as QR.
- Phone cameras read QR codes natively. If the QR code holds a web address, the phone offers to open it.
So a QR code on its own would fail at every till that still uses a laser scanner. That is one reason retail checkouts are upgrading. Sunrise 2027 (GS1 calls it Ambition 2027) is the retail industry's voluntary goal for checkouts to read the GTIN from 2D barcodes as well as linear ones by the end of 2027. It is a goal for scanners, not a law and not a deadline for removing barcodes. What happens at the till when it reads either code is covered in what happens when a product is scanned at the checkout.
Size, printing and clear space
Both formats need a blank margin around them, the quiet zone, so the reader can find where the code starts and ends. For a QR code at retail, GS1 specifies a quiet zone of four modules on all four sides. Crowding a code against other artwork is one of the most common reasons it fails.
GS1 also sets size ranges for retail codes. Because a camera needs more detail than a laser beam, GS1 specifies 2D codes at 1.5 times the module size of an equivalent linear barcode. In practice, a QR code is compact for the amount of data it carries, but it is not a free addition to a crowded label.
For both formats, a code that decodes once on a phone is not the same as a code that passes verification. Retail checkout codes, linear and 2D alike, have a minimum print-quality grade of 1.5 (C) when graded to the relevant ISO/IEC standard. More on this in why "printed" is not the same as "verified".
Damage and wear
A linear barcode includes a check digit, so a scanner can usually detect a misread. But it cannot rebuild data that is missing. A scuff along the bars may still leave a clean path for the scanner; a deep scratch across them, or a crease in a flexible pack, can make the code unreadable.
A QR code has built-in error correction. Extra data is added when the code is created, so a reader can recover the content even if part of the symbol is dirty, scratched or covered. There is a limit, set when the code is generated, and higher error correction means a larger code for the same data. It also does not fix poor printing: smudged or faint modules across the whole code still cause failures.
Side by side
| Linear barcode (EAN/UPC) | QR code | |
|---|---|---|
| Stores data | In one direction, as bars and spaces | In two directions, as a grid of modules |
| Typical content on a retail pack | The GTIN only | GTIN plus batch, expiry or serial, often as a GS1 Digital Link web address |
| Laser scanner | Reads it | Cannot read it |
| Imaging scanner | Reads it | Reads it |
| Phone camera | Some apps decode the number; nothing to open | Opens the web address inside |
| Damage tolerance | Check digit detects errors; no recovery | Error correction can recover partly damaged codes |
| Retail checkout today | The established standard | Approved when it carries an uncompressed GS1 Digital Link, alongside the barcode |
| Typical uses | Checkout scanning, stock control | Consumer information, warranty, loyalty, batch and unit tracking |
Where each is used
The linear barcode is the workhorse of retail checkout and much of warehouse stock control. It is simple, cheap to print and read by almost every scanner in use today.
QR codes are most visible where a phone is involved: product information, instructions, warranty registration, loyalty and recycling details. When the QR code carries GS1 data, it can also take on supply-chain jobs, such as identifying a batch for a recall or a single unit for traceability. Not every QR code on a pack does that; "GS1 QR code" means different things to different people, as explained in what is a GS1 QR code?
The transition: both on the pack
Retail is moving towards 2D codes, but not by switching barcodes off. During the transition, GS1 rules require the linear barcode to stay alongside the 2D code on general retail items, both carrying the same GTIN, until a checkout-capability threshold is met rather than a calendar date. The reasoning is set out in why 1D and 2D barcodes will coexist.
Where to go next
If you are choosing between 2D formats, QR code vs GS1 DataMatrix compares the two square codes. If you want to know whether a QR code could ever stand alone on a retail pack, read can a QR code with GS1 Digital Link replace a retail barcode?
See your GTIN as a QR code with a GS1 Digital Link