A cashier scans a cereal box and the till knows the price. You point a phone at a poster and a menu opens. Both are black and white patterns read by a light sensor, and most people use the two words interchangeably.
They are not the same thing, and the difference is not cosmetic. One stores a pointer to information. The other stores the information.
The One Sentence Version
A traditional barcode is one dimensional: the data lives in the varying widths of vertical bars and is read along a single line. A QR code is two dimensional: the data lives in a grid of squares and is read across both axes at once.
Everything else follows from that. Capacity, damage tolerance, read angle, and what each one can practically be used for.
| 1D barcode (UPC-A, EAN-13) | QR code | |
|---|---|---|
| Reading direction | Horizontal only | Both axes |
| Typical capacity | 12 to 13 digits | Up to 7,089 digits or 4,296 characters |
| What it holds | A product number | A URL, text, WiFi login, contact card |
| Needs a database | Yes, always | No |
| Damage tolerance | Very low | Up to 30 percent at the highest error correction |
| Read at any angle | No | Yes |
| Origin | Patented 1949, first retail scan 1974 | Denso Wave, 1994 |
A Barcode Is a Pointer, Not a Fact
This is the part that surprises people. The barcode on a product contains no price, no product name and no description. A UPC-A code holds twelve digits and nothing else.
Those digits are meaningless on their own. The till reads them, looks them up in the shop's own database, and finds the price there. That is precisely why the same product carries the same barcode in two shops at two different prices, and why a price change requires no new label on the packaging.
It also explains the capacity question. Twelve digits was never a limitation to work around, because a pointer does not need to be large. The system was designed in an era when the expensive part was the scanner, and a number that indexes into a database was the cheapest possible design.
A QR Code Carries Its Own Payload
A QR code does not need a lookup. The full web address, the whole WiFi password, the entire contact card is physically present in the pattern. Scanning it offline still yields the content.
That self contained design is what makes them useful on posters, packaging and restaurant tables where no shared database exists between the printer and the reader. It is also, as we will get to, the thing that makes them exploitable.
Three other design decisions matter in practice:
- The three big squares. Those finder patterns in the corners let a scanner locate and orient the code from any rotation. A barcode has no equivalent, which is why supermarket scanners are built to sweep in multiple directions.
- Error correction. Reed Solomon redundancy is built into the data itself, so a code keeps working while damaged.
- Versions. QR codes come in 40 sizes from 21 by 21 modules up to 177 by 177. More data means a denser grid, which means it needs to be printed larger to stay readable.
| Error correction level | Recoverable damage | Cost |
|---|---|---|
| L | About 7 percent | Smallest code for a given payload |
| M | About 15 percent | The common default |
| Q | About 25 percent | Denser |
| H | About 30 percent | Densest, but survives a logo placed in the middle |
Level H is the reason a company logo can sit over the center of a QR code without breaking it. The code is not ignoring the logo, it is reconstructing the covered data from redundancy.
The Barcode Family Is Bigger Than People Think
"Barcode" is not one format. It is a family of symbologies, and some of them are 2D, which means the shorthand of "2D equals QR" is wrong.
| Symbology | Where you see it | What it holds |
|---|---|---|
| UPC-A | Retail, North America | 12 digits |
| EAN-13 | Retail, most of the world | 13 digits |
| Code 39 | ID badges, industrial parts | Letters and digits, variable length |
| Code 128 | Shipping labels, logistics, internal inventory | Full ASCII, variable length |
| ITF-14 | Outer shipping cartons | 14 digits, prints reliably on cardboard |
| PDF417 | Driving licences, boarding passes | Around 1.8 KB, stacked 2D |
| Data Matrix | Tiny components, medical devices | 2D, works at a few millimetres square |
| Aztec | Rail and airline tickets | 2D, needs no surrounding blank margin |
Data Matrix and Aztec are worth knowing because they solve problems QR codes do not. Data Matrix stays readable at sizes far too small for a QR code, which is why it ends up on circuit boards and surgical instruments. Aztec needs no quiet zone around it, which saves space on a ticket.
Which One You Actually Need
- Selling a physical product through shops. You need a GS1 issued UPC or EAN. You cannot invent one, and a made up number will either collide with a real product or be rejected outright.
- Linking to anything online. QR code, always. This is the case the format was eventually adopted for.
- Guest WiFi. QR code. The network name, security type and password are encoded directly, so a guest joins without you reading a password aloud.
- Internal inventory or asset tags. Code 128 if you have a laser scanner, Data Matrix if the label has to be tiny, QR if people will scan with phones.
- Event tickets. Usually decided by your ticketing provider, and usually Aztec or PDF417 for the compact stacked formats or QR for phone friendliness.
The general rule: if a phone camera is the scanner, use a QR code. If a dedicated laser scanner is the reader and the data is a short ID, a 1D barcode is smaller, cheaper to print and faster to read.
Why Phones Read QR Codes Better
A supermarket scanner uses a laser sweeping across the bars and measures reflected light over time. It is extremely good at exactly one thing.
A phone takes a photograph and analyses it. For a QR code that works well, because the finder patterns tell the software where the code is and which way up it is, and the error correction absorbs blur, glare and creases. For a 1D barcode it is harder: thin vertical lines have to be resolved individually, the code must be roughly aligned, and a slight fold across the bars can make it unreadable.
This is why your iPhone Camera app scans a QR code on a poster instantly and then struggles with the small barcode on a jar of jam. It is not a defect. The formats have different tolerances and the camera path favours the newer one. A reader app that explicitly implements UPC, EAN, Code 39 and Code 128 handles the second case far better, because it is running decoders the general camera pipeline does not prioritise. Our guide to scanning QR codes on iPhone covers the built in Camera and Control Center routes in full.
The Security Difference Nobody Mentions
Twelve digits cannot take you anywhere. A barcode has no mechanism to open a browser, join a network or send a payment, because the content is a number that only your shop's database interprets.
A QR code carries a URL. That single fact makes it an attack surface. Anyone with a printer and a sticker can cover a legitimate code on a parking meter, a restaurant table or a package with one that leads somewhere else, and the victim has no way to read the destination beforehand. The scam has a name now, quishing, and we broke down how to spot it in are QR codes safe.
The single most useful habit: use a scanner that shows the full URL and waits for you to confirm, rather than one that opens links immediately.
Where a Dedicated Reader Helps
Smart QR and Barcode Reader handles both families in one place, which matters because the two failure modes are different. QR codes fail on damage and angle, and a reader with strong decoding handles those. Barcodes fail on size, glare and format support, and a reader that implements the specific symbologies handles those. It also keeps a history of what you scanned, which the Camera app does not, and generates codes as well as reading them.
Two honest limits are worth stating. It cannot give you a valid retail UPC or EAN, because those come from GS1 registration and no app can issue one. And no scanner can tell you whether the website behind a QR code is trustworthy. It can show you the address before you commit, which is the part that matters, but reading it is still your job.
If you are on the creating side rather than the scanning side, how to make a QR code for free walks through links, WiFi and menu codes and the static versus dynamic decision that most guides skip.
The Bottom Line
A barcode is an index entry: twelve digits that mean nothing until a database interprets them, which is why it is small, cheap and useless without a system behind it.
A QR code is the content itself: hundreds or thousands of characters, readable at any angle, still working with a third of it damaged, and needing nothing on the other end. That self sufficiency is both why it took over public spaces and why a sticker placed over one is a working scam. Choose based on whether a phone or a laser is doing the reading, and whether the data has a database waiting for it.