QR code vs barcode: what's the difference?
A barcode stores a short number in lines read in one direction; a QR code stores links and text in a square grid. How they differ, and when to use each.
The main difference between a QR code and a barcode is how much they hold and how they’re read. A traditional barcode stores a short code, usually 8 to 20 characters, in a single row of bars that’s read from side to side. A QR code stores up to a few thousand characters, such as a full web address or Wi-Fi details, in a square grid that’s read in both directions. Technically, a QR code is a type of barcode: a two-dimensional (2D) one.
How each one stores information
A linear (1D) barcode, like the one on a packet of biscuits, encodes characters in the widths of its bars and spaces. The height of the bars adds nothing; it only makes the code easier to hit with a scanner beam. So the only way to store more is to make the barcode longer.
A QR code stores information in both width and height, as a grid of small squares. That’s why a postage-stamp-sized QR code can hold a whole web address, while a barcode of the same size holds about a dozen digits. How QR codes work explains the grid in detail.
QR code vs barcode at a glance
| Linear barcode | QR code | |
|---|---|---|
| Shape | A row of bars | A square grid of modules |
| Typical content | A number, such as a product or parcel ID | A link, text, Wi-Fi details, a contact, a payment request |
| Capacity | A short number or code, usually a few dozen characters at most | Up to 7,089 digits or 2,953 bytes in the largest version |
| Read direction | Side to side | Any direction; the corner squares show orientation |
| Damage tolerance | Low; a check digit catches errors but can’t fix them | Built-in error correction can rebuild up to about 30% |
| Scanner | Laser scanners, cameras | Cameras, including any phone |
| Common uses | Shop checkouts, stock, parcels, libraries | Menus, payments, tickets, Wi-Fi, marketing |
Capacity figures for QR codes are from Denso Wave, which invented the QR code.
Why shop barcodes only hold a number
The barcode on a product, usually an EAN-13 (or UPC-A in North America), holds just 12 or 13 digits. It doesn’t contain the price or the name. The number is a key: the shop’s system looks it up in its own database to find the product and price. That keeps the barcode short and lets the shop change the price without relabeling anything.
These numbers are allocated by GS1, the organization that runs the global product-numbering system. In India, product numbers issued through GS1 India usually start with 890.
A QR code, in contrast, normally carries the content itself: the full link, or the Wi-Fi network name and password. Scanning it gives you the information directly, without anyone’s database.
Which one should you use?
Use a QR code when people will scan it with their phones, or when you need to store more than a short number:
- a link to a website, menu, or form;
- Wi-Fi details, a contact card, or a location;
- anything printed small that has to hold a lot.
Use a linear barcode when it will be read by existing checkout or warehouse equipment:
- products sold in shops (an EAN-13 or UPC-A with a GS1-issued number);
- stock labels, asset tags, or library cards (often Code 128 or Code 39);
- shipping and logistics systems that expect a particular format.
Retail is slowly moving toward 2D codes too. GS1’s Sunrise 2027 program aims for checkout scanners to read 2D barcodes, such as QR codes carrying a GS1 Digital Link, by the end of 2027, so one code can work at the till and for shoppers’ phones.
Other kinds of 2D barcodes
QR codes are the best known 2D barcode, but not the only one:
- Data Matrix: tiny square codes on electronic parts, medicine packs, and some parcels.
- PDF417: a stacked barcode used on many boarding passes and ID cards.
- Aztec: common on train and airline tickets, with a bullseye in the center.
Types of barcodes covers each in more detail, with the formats your phone can read.
Common questions
Can a phone scan both?
Yes. Phone cameras read QR codes and most common linear barcodes. Laser scanners at shop checkouts usually read only linear barcodes, although newer camera-based checkout scanners read QR codes too. See how to scan a barcode with your phone.
Is a QR code more secure than a barcode?
Neither is secure by itself. Both are just ways of printing information that anyone can read. A QR code’s error correction protects against damage, not tampering.
Can I turn a barcode into a QR code?
You can put the same number into a QR code, but a checkout or warehouse system that expects a particular barcode format may not accept it. Check what the system reading it supports.
A note on EveryQR
EveryQR, the Android app I make, scans both QR codes and common barcodes with the camera, and its barcode maker creates formats such as EAN-13, UPC-A, and Code 128 alongside QR codes.
Related guides
- What is a QR code? A plain-English guide
- Types of barcodes: 1D and 2D explained
- How to scan a barcode with your phone
Browse all QR code guides.
About the author
I’m Shekhar Roy, a software engineer in New Delhi. I build EveryQR, a QR code scanner and creator for Android, and I write these guides from what I’ve learned making and testing it.