GridQRCreate QR code

QR code vs barcode: what's the difference?

A barcode stores a short number in a single row of bars and is read across its width. A QR code stores data in two directions, across a square grid, so it holds thousands of characters instead of about a dozen, survives some damage and can be read by a phone camera. Shops use barcodes to look up a product; people use QR codes to open a link.

6 min read

One dimension or two

A classic barcode, such as the UPC on products in the US or the EAN used in most other countries, is one-dimensional. The information is in the widths of the bars and the gaps between them, read along one line. The height of the bars only gives the scanner more places to cross them. A UPC-A holds 12 digits, an EAN-13 holds 13.

Those digits are a key, not a description. The checkout looks the number up in its own database to find the product and its price. The price isn't in the barcode.

A QR code is two-dimensional: data runs across and down a grid of small squares. That is how it fits a whole web address, Wi-Fi details or a contact card. Strictly, it is a kind of barcode too, a 2D barcode, but in everyday speech “barcode” means the striped kind.

Side by side

Barcode (UPC, EAN)QR code
ShapeBars in one rowSquare grid
Holds12 or 13 digitsUp to 7,089 digits or 2,953 bytes
Typical contentA product numberA link, text, Wi-Fi details, a contact
Error handlingA check digit that detects mistakes but can't fix themReed-Solomon, restores about 7% to 30%
Read byLaser or camera-based scannersPhone cameras and camera-based scanners
Scanning angleThe scan line has to cross the barsAny angle
Main usesCheckout, stock, shippingLinks from print, menus, tickets, payments

Laser scanners, the kind that draws a red line, can only read 1D barcodes. Anything 2D needs a scanner that takes an image, the way a phone camera does.

Where each one is used

  • Barcodes: retail checkout, warehouse stock, shipping labels, library books. Anywhere a scanner needs a number to look up.
  • QR codes: anything aimed at people with phones. Menus, packaging that links to instructions, posters, business cards, event tickets, payments and Wi-Fi access.

Many products carry both: a barcode for the checkout and a QR code for the customer.

Data Matrix vs QR code

Data Matrix is another 2D code, often seen as a tiny square on electronics, machine parts, medicine packs and medical devices. You can tell it apart by its border: a solid L along two sides and a dotted line along the other two, where a QR code has three corner squares.

Data MatrixQR code
FinderSolid L-shaped border on two sidesThree corner squares
ShapesSquare or rectangularSquare
Grid sizes10 × 10 to 144 × 144 modules (square)21 × 21 to 177 × 177 modules
Largest capacity3,116 digits or 1,556 bytes7,089 digits or 2,953 bytes
Error correctionReed-Solomon, level set by the sizeReed-Solomon, four levels to choose from
Typical useParts marking, healthcare, industryPrint aimed at the public

Data Matrix suits small items and is often etched or printed straight onto metal or plastic. For anything you want the public to scan, QR is the safer choice, because phone camera apps are built around it.

Barcodes at checkout are going 2D

GS1 US, the organization that issues product barcode numbers in the US, leads an industry plan called Sunrise 2027. Its aim is that retail checkout scanners can read 2D barcodes by the end of 2027.

The 2D codes in question are GS1 DataMatrix and QR codes that follow the GS1 Digital Link standard. They carry the same product number (the GTIN) as the UPC, can add details such as a batch number or an expiry date, and in the QR form can also open a web page for the shopper.

The UPC isn't going away. GS1 US says it will keep scanning after 2027, and many products will carry both kinds of code during the change.

A QR code made in a generator such as GridQR is a code for people: it opens a page. It doesn't replace the product barcode at checkout, which needs a GS1 product number in a GS1 format.

Which one do you need?

  • Selling a product in stores: you need a GS1 product number and the barcode your retailers ask for. Check with them before you change anything.
  • Sending people from print to a page, a menu, a form or a contact card: a QR code.
  • Both on the same pack is normal. Keep them apart, so the checkout scanner and the customer's phone each find their own code.

Put it to use

Keep reading

All guides

Questions

Can a phone scan a regular barcode?

Many can, with a scanner app or a shop's own app. Phone cameras are built first of all for QR codes. A product barcode only holds a number, so there is little for the phone to open.

Can a QR code replace the barcode on my product?

Not an ordinary one. At checkout the scanner needs a product number in GS1 format. A QR code that follows GS1 Digital Link can carry that number, but only if your retailers' scanners read it. Until then, keep the UPC or EAN.

Is a QR code more secure than a barcode?

Neither is encrypted. Anyone who scans a QR code can read what is in it, so don't put anything private in a static code. A dynamic code holds only a short link, and GridQR lets you ask for a password before the page opens.

Which holds more, Data Matrix or a QR code?

A QR code, at the largest sizes: 7,089 digits against 3,116. For the short numbers used in parts marking and healthcare, both have more room than they need.

Make a code you won’t have to reprint

Design it now. Pay when you download, from $1.99 for 7 days.

Create QR code