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 | |
|---|---|---|
| Shape | Bars in one row | Square grid |
| Holds | 12 or 13 digits | Up to 7,089 digits or 2,953 bytes |
| Typical content | A product number | A link, text, Wi-Fi details, a contact |
| Error handling | A check digit that detects mistakes but can't fix them | Reed-Solomon, restores about 7% to 30% |
| Read by | Laser or camera-based scanners | Phone cameras and camera-based scanners |
| Scanning angle | The scan line has to cross the bars | Any angle |
| Main uses | Checkout, stock, shipping | Links 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 Matrix | QR code | |
|---|---|---|
| Finder | Solid L-shaped border on two sides | Three corner squares |
| Shapes | Square or rectangular | Square |
| Grid sizes | 10 × 10 to 144 × 144 modules (square) | 21 × 21 to 177 × 177 modules |
| Largest capacity | 3,116 digits or 1,556 bytes | 7,089 digits or 2,953 bytes |
| Error correction | Reed-Solomon, level set by the size | Reed-Solomon, four levels to choose from |
| Typical use | Parts marking, healthcare, industry | Print 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.