QR code vs barcode: the difference
Why the stripes on a cereal box and the square on a menu are different tools, which scanners read which, and where the two are starting to overlap.
Short answerA traditional barcode is one-dimensional: a row of bars that encodes a short number, read in a single direction by a laser or imaging scanner. A QR code is two-dimensional: a grid that stores much more data, including full web addresses, reads from any angle with a phone camera, and survives partial damage through error correction.
What a linear barcode is
The striped barcodes on retail products are called linear or 1D barcodes. Information is held in the widths of the bars and the gaps between them, read along one horizontal line. The height of the bars adds no data; it only gives the scanner more places to cross the code.
- UPC and EAN. The codes on consumer products. UPC-A carries 12 digits and EAN-13 carries 13. The number identifies the product; the price and description live in the shop’s database, not in the barcode.
- Code 128. A general-purpose symbology used in shipping, logistics, and warehousing. It can encode letters as well as digits, and its length varies with the data.
- Others. Code 39, ITF, and many more exist for specific industries, but they share the same basic limitation: a short string, read in one direction.
Linear barcodes are excellent at their job. They are simple to print, decades of checkout hardware are built around them, and a laser scanner reads them in a fraction of a second. Their job is just narrow: look up a record by its number.
Side by side
| Linear barcode (UPC, EAN, Code 128) | QR code | |
|---|---|---|
| Dimensions | One — data runs along a line | Two — data fills a square grid |
| Typical capacity | A dozen digits up to a few dozen characters | Up to a few thousand characters |
| Holds a web address | Not practically | Yes — the most common use |
| Read direction | Scanner must cross the bars | Any angle, including upside down |
| Damage tolerance | Limited; a check digit detects errors but cannot repair them | Error correction rebuilds about 7% to 30% of the code |
| Reader | Laser or imaging scanner | Imaging scanner or any phone camera |
| Main use | Checkout, inventory, shipping | Links, tickets, payments, labels |
The capacity gap is the important one. A barcode is an identifier that only means something once a computer looks it up. A QR code can carry the destination itself — a full URL — so any phone can act on it with no database behind it. The limits on how much fits are set out in how much data a QR code can hold, and the self-repairing behaviour in QR code error correction.
Who can read which
Classic laser scanners sweep a beam across the bars and measure the reflection. That works for a 1D code but cannot read a 2D one, because a single line through a QR code is meaningless on its own. Imaging scanners — essentially cameras — capture the whole symbol and can read both kinds, which is why newer checkout and warehouse hardware handles QR codes as well.
Phones sit firmly on the camera side. The built-in camera app on modern iPhones and Android phones recognises QR codes directly, as explained in how to scan a QR code. Reading a product barcode on a phone usually needs a separate app, and even then you only get a number unless that app looks it up somewhere.
Other 2D codes, and the move to QR on packaging
QR is not the only two-dimensional format. Data Matrix is a compact square code widely used to mark small parts, electronics, and healthcare products, where space is tight. PDF417 is a stacked format — rows of small linear patterns — found on many ID cards, travel documents, and shipping labels. Both are read by imaging scanners; neither is recognised by a typical phone camera app the way QR is.
Retail is gradually moving toward 2D codes on products. GS1, the organisation that issues product numbers, has defined GS1 Digital Link, a way of writing the product number into a web address. Encoded in a QR code, the same symbol can be scanned at the till for the product number and by a shopper’s phone to open product information. Adoption is ongoing and varies by country and retailer.
If you sell through retailers, your product barcode must still come from GS1 or your retailer’s requirements. A QR code from a general generator like this one is for linking customers to a page — not a substitute for a registered product barcode. See QR codes for product packaging.
Which one to use
- Use a linear barcode for point-of-sale identification, stock control, and shipping labels — anywhere existing scanners and databases expect one.
- Use a QR code when a person with a phone should end up somewhere: a website, a restaurant menu, a review page, a video, a booking form, or a poster or flyer call to action.
- Use both on packaging: the barcode for the till, the QR code for the customer.
This site makes QR codes only — for web links, Wi-Fi, text, email, phone numbers, and SMS. It does not produce UPC, EAN, Code 128, or other barcodes. If what you need is a code that opens a page, paste the address and download a print-ready PNG or SVG. For the basics of the format, start with what a QR code is.
Turn a web address into a QR code:Generate a QR code
Related questions
Yes. A QR code is a two-dimensional matrix barcode. In everyday speech “barcode” usually means the striped one-dimensional kind, which is why the two are often contrasted.
In some places they are starting to, particularly on retail packaging where one QR code can serve both the checkout and the shopper. Linear barcodes remain everywhere for now, because so much scanning hardware and so many systems depend on them.
The built-in camera on most phones recognises QR codes but not product barcodes. Barcode-reading apps exist, but a product barcode only gives you a number, which means nothing without a database to look it up in.
No. Laser scanners read along a single line, which works only for linear barcodes. QR codes need an imaging scanner or a camera that captures the whole symbol.
A product barcode holds 12 or 13 digits. A QR code can hold up to 7,089 digits or 2,953 bytes, although printed codes are best kept far below that limit.