Guide

Barcode vs QR code: what's the difference?

A classic barcode stores a short number in a row of vertical lines, read in one direction. A QR code stores data in a square grid, across and down, so it holds far more: up to thousands of characters, including whole web links. Barcodes identify products at checkouts. QR codes hand a phone a link, Wi-Fi login or payment.

A QR code is a barcode, just a 2D one

When people say "barcode" they usually mean the one-dimensional kind on groceries: black bars and white gaps of varying width, read along a single line. All the information is in that one direction. Making the bars taller adds nothing; it only makes them easier to hit with a laser.

A QR code is a two-dimensional barcode. It stores data across and down in a grid of small squares, which multiplies what fits in the same space. Its three corner squares also tell the scanner which way is up, so it reads at any angle. The interactive explainer shows how those corners and the data grid fit together.

The two compared

Barcode (1D)QR code (2D)
Looks likeVertical linesSquare grid with three corner squares
Typical contentsA product number, 12 or 13 digits on UPC-A and EAN-13A link, text, Wi-Fi login, contact card, payment request
Maximum capacityTens of characters at most7,089 digits or 2,953 bytes (capacity)
Read directionAlong one lineAny angle
Damage toleranceA torn barcode often failsError correction restores up to about 30% of the data
Scanned byLaser and image scannersPhone cameras and image scanners
Lookup needed?Yes: the number points to a record in a databaseNo: the content is in the code
StandardMany (UPC, EAN, Code 128, Code 39 and more)One, ISO/IEC 18004

That "lookup needed" row is the real difference for most people. A phone can read a grocery barcode with Google Lens or a shopping app, but all it gets is a number, which it then has to search for. A QR code carries the full link, so the phone opens it directly.

Twenty years apart

Norman Joseph Woodland and Bernard Silver were granted a US patent for a barcode in 1952. The first retail scan of a UPC barcode came on 26 June 1974, at a Marsh supermarket in Troy, Ohio: a 10-pack of Wrigley's Juicy Fruit gum (GS1). The QR code arrived in 1994 from Denso Wave in Japan, because barcodes couldn't hold enough for its car parts factories. The QR code history page has that story.

The checkout is moving to 2D

GS1, which issues product barcode numbers, has set an industry goal that checkout systems can read a defined set of 2D codes by the end of 2027, alongside the existing linear barcodes (GS1). Three kinds are on the list: GS1 DataMatrix, Data Matrix with a GS1 Digital Link address, and QR code with a GS1 Digital Link address. The effort is often called Sunrise 2027.

GS1 Digital Link writes a product number as a web address. Using GS1's own example product number, a QR code would hold:

https://id.gs1.org/01/09506000134352

Our encoder stores that as a byte-mode prefix and a numeric run for the 14 digits, and it fits in a 29 × 29 code at level M. A checkout reads the product number out of it; a phone opens the page. During the transition, packs carry both the old barcode and the new 2D code. The Data Matrix vs QR code page covers the other option on GS1's list.

Which one you need

Use a registered GS1 barcode (UPC or EAN) if you sell products through retailers. Their tills and stock systems expect one, and a QR code from any generator, ours included, doesn't replace it.

Use a QR code when a person will scan it with a phone, or when it has to carry a link, a Wi-Fi password, contact details or a payment request. Make one for a link with the URL QR code generator.

Two other codes you may run into: Aztec, on many boarding passes and rail tickets, and NFC tags, which aren't printed at all.

Written by Last updated