The stripes on a tin of beans and the square on a restaurant table are cousins. Both turn data into a pattern a machine reads. The difference is one of dimensions. A barcode of stripes stores data along one line. A QR code stores it across a grid, in two dimensions, and that one change is why it holds hundreds of times more and why a phone camera can read it.
One dimension against two
A 1D barcode such as the UPC on groceries is a row of bars of different widths. The height carries no information at all. It is there only so a scanner can hit the stripes somewhere along their length. A UPC-A code stores exactly 12 digits, and that is all it will ever store. The digits are a product number; the price and name live in the shop’s database.
A 2D code uses both directions. Every module in the grid is a bit of data, so a code the size of a postage stamp can hold a full web address, a contact card or a page of text. A QR code at version 40 holds up to 7,089 digits.
The scanner is different too. A 1D barcode is read by sweeping a line across it, which is why supermarket tills use a laser. A 2D code must be read as a picture, which is why the camera in your phone is the natural scanner for it.
The 2D family
QR is not the only grid code. Each of these was designed for a particular industry, and most are still there.
| Code | What it looks like | Holds up to (approx.) | Standard | Where you meet it |
|---|---|---|---|---|
| QR code | Square grid, three corner squares | 7,089 digits, 4,296 letters | ISO/IEC 18004 | Everywhere the public scans: menus, tickets, payments, posters |
| Data Matrix | Square or rectangle, solid L-shaped border | 3,116 digits, 2,335 letters | ISO/IEC 16022 | Electronics parts, medicine packs, tiny labels |
| Aztec | Square with a bullseye in the centre, no quiet zone | 3,832 digits, 3,067 letters | ISO/IEC 24778 | Airline and rail boarding passes and tickets |
| PDF417 | Wide stacked rows of bars | 2,710 digits, 1,850 letters | ISO/IEC 15438 | Driving licences and ID cards in the USA, some boarding passes |
| MaxiCode | Hexagon dots around a bullseye, fixed size | About 93 characters | ISO/IEC 16023 | UPS shipping labels |
| Micro QR | Tiny QR with one corner square | 35 digits, 21 letters | ISO/IEC 18004 | Circuit boards and small parts, mostly in Japan |
| rMQR | Rectangular QR, two corner marks | 361 digits | ISO/IEC 23941 | Narrow labels on tubes, cables and medicine strips |
The capacities are the maximum for the biggest size of each code at its lowest error correction, and are approximate. The Micro QR and rMQR figures are from Denso Wave’s own pages (Micro QR, rMQR). The variants article has more on the QR family members.
Where each one lives
Boarding passes. The airline industry’s bar-coded boarding pass standard from IATA allows Aztec, QR, Data Matrix and PDF417. A mobile pass in Apple Wallet or Google Wallet is commonly Aztec or QR; a paper pass printed at the airport is often PDF417. Aztec suits phone screens because it needs no quiet zone, so it can sit tight against the edge of a pass.
Driving licences. The back of a US driving licence carries a PDF417 code holding the name, date of birth and address printed on the front, so a bar or a police officer can read the card by machine. The wide, stacked shape fits the strip of space on a card.
Parcels. A UPS label carries a MaxiCode. Its fixed size and hexagon dots were chosen so that a sorting machine can read it from any angle as a parcel flies past on a conveyor. It holds only about 93 characters, but a postcode and tracking number is all a sorter needs.
Electronics and medicines. Data Matrix can be as small as 10 by 10 modules and can be etched or dot-peened directly onto metal, so it marks circuit boards and surgical instruments. Medicine packs in Europe carry a Data Matrix with the product code, batch and expiry date. Pharmacies scan it to check the pack is genuine.
Everything the public scans. QR. Not because it is technically superior in every case, but because it is the one code that the camera app on every modern phone reads without any extra software. Data Matrix and Aztec need a scanner app on most phones. Micro QR and rMQR have thin support even in apps.
In practice
If a person with a phone is the scanner, use a QR code. If a machine you control is the scanner, choose whatever fits the space and the machine. This one rule settles almost every choice.
How they compare
| Feature | 1D stripes | QR | Data Matrix | Aztec | PDF417 |
|---|---|---|---|---|---|
| Phone camera app reads it natively | ✕ | ✓ | ✕ | ✕ | ✕ |
| Holds a full web address | ✕ | ✓ | ✓ | ✓ | ✓ |
| Built-in error correction | ✕ | ✓ | ✓ | ✓ | ✓ |
| Needs a quiet zone | ✓ | ✓ | ✓ | ✕ | ✓ |
| Works well when tiny | ✕ | Version 1 is 21 modules | From 10 modules | From 15 modules | ✕ |
| Reads from any rotation | ✕ | ✓ | ✓ | ✓ | ✕ |
| Typical home | Retail tills | Public scanning | Parts and medicines | Tickets | ID cards |
What is changing in retail
The stripes on products are the oldest barcodes still in daily use, and they are on their way to sharing the label. GS1, the body that issues retail product numbers, has a programme it calls Sunrise 2027. The aim is for tills worldwide to be able to read a 2D code by the end of 2027, so that a single QR code carrying a GS1 Digital Link can serve the till, the customer’s phone and the recycling scheme at once. That claim comes from GS1’s own material, so treat the date as a target rather than a promise.
The European Union’s Digital Product Passport rules point the same way: from 2026 onward, categories of product will need a scannable data carrier, and a QR code is the obvious choice. The stripes will not vanish for years, but the square next to them is coming.
▸Why QR won the phone
Three design choices made QR the code phones read. First, the three finder patterns with their 1:1:3:1:1 ratio can be found quickly from any angle with the low-power processors of early camera phones; Data Matrix’s L-shaped border is harder to find in a cluttered picture. Second, Denso Wave declared in 1999 that it would not enforce its patent, so every phone maker could add a reader without a licence. Third, Japan’s phone networks shipped readers in handsets from 2002, so by the time Apple added native scanning to the iPhone camera in 2017 the format had fifteen years of use behind it. Aztec and Data Matrix are just as capable on paper. They simply were never the default.
Try it yourself
Photograph any code you have to hand, a QR on a poster, an Aztec on a train ticket, the Data Matrix on a medicine box, and see which ones the decoder can read and what text is inside.