1D vs 2D barcodes: what retailers need to know
How linear codes such as UPC, EAN and Code 128 compare with QR and Data Matrix symbols on capacity, size, damage tolerance and scanners, and how a small shop should choose between them.
Last updated November 2, 2026
Linear codes such as UPC, EAN and Code 128 have been on packaging for decades. Square codes such as QR and Data Matrix are now appearing on packaging, coupons and receipts. This guide compares the two so you can choose the right one for a label, a shelf or a scanner purchase.
What is a 1D barcode
A linear, or one-dimensional, barcode stores data as a row of bars and spaces of varying widths. The scanner reads across the row in one direction. Height only gives the scanner room to find a clean line.
The common retail symbologies are UPC-A (12 digits, North American packaging), EAN-13 (13 digits, used internationally and read by the same scanners) and Code 128 (letters and digits, variable length, common on shipping labels and internal shelf labels). UPC and EAN end in a check digit that catches most misreads and carry no error correction beyond that. GS1 US summarizes the retail symbologies in its barcode types guide.
Example (fictional product): UPC-A 012345678905. The last digit, 5, is the check digit.
What is a 2D barcode
A two-dimensional barcode stores data in a grid of cells read across both width and height. The grid packs far more cells into the same footprint, so it can hold a web address, an expiry date or a lot number as well as the product identifier. QR codes have finder squares at three corners; Data Matrix has an L-shaped solid border and comes in square and rectangular shapes.
Both carry built-in error correction. A QR code offers four selectable levels, and at the highest level roughly 30 percent of the symbol can be obscured and still decode. The symbology is defined in ISO/IEC 18004. GS1 DataMatrix is Data Matrix with GS1 formatting, used on pharmaceuticals, fresh food and other items that need more than a product number.
Example (fictional product): a GS1 DataMatrix the size of a fingernail holding the GTIN, an expiry date and a lot number.
How much data can a barcode hold
| Feature | UPC-A / EAN-13 | Code 128 | QR code | GS1 DataMatrix |
|---|---|---|---|---|
| Capacity | 12 or 13 digits | Letters and digits, dozens in practice | 7,089 digits or 4,296 alphanumeric | 3,116 digits or 2,335 alphanumeric |
| Footprint | Wide and short | Grows wider with every character | Small square | Smallest for the same data |
| Damage tolerance | Check digit only | Check character only | Error correction, four levels | Error correction |
| Reads with a laser scanner | Yes | Yes | No | No |
| Reads with an imager or phone camera | Yes | Yes | Yes | Yes |
The capacity figures come from the GS1 2D barcode standards page. In a shop, the practical difference between 1d and 2d barcodes is footprint rather than maximum capacity. A linear code gets wider with every character you add, while a 2D code stays compact.
Which scanner reads which code
A laser scanner sweeps a beam across the bars and measures the reflected light along that line. It cannot see a grid. An imager, sometimes sold as a 2d barcode scanner, photographs the symbol and decodes it in software, so it reads both families and codes shown on a phone screen.
Can a laser scanner read QR codes
No. A laser reads one line at a time, and a QR code needs the whole grid. A laser model reads UPC, EAN and Code 128 labels and ignores every QR code and Data Matrix symbol. Replacing it with an imager opens up 2D codes, and imagers read linear codes as well.
QR code vs Data Matrix
Both carry error correction and read from any angle with an imager. QR codes are what phone cameras decode without an app, which makes them the right choice when a customer is meant to scan. Data Matrix fits a smaller space and is the GS1 choice where a dedicated scanner reads a product number plus expiry and lot data, such as fresh food and medicines. Phone cameras read Data Matrix less reliably, so keep it for staff scanning.
Where each code shows up in a shop
- Product packaging: UPC-A or EAN-13 printed by the brand and read at checkout. Cases use ITF-14, which is not meant for point-of-sale scanning.
- Shelf labels: Code 128 carrying your internal SKU, sometimes beside a QR code for a stock lookup. See the shelf labels guide for sizing and placement.
- Coupons and receipts: a linear code on paper, QR codes on phone screens and for digital receipts.
- Shipping labels: Code 128 or GS1-128 for tracking numbers.
GS1 Sunrise 2027 and GS1 Digital Link
GS1 US describes Sunrise 2027 as the milestone by which retail point-of-sale systems should be able to read and process 2D barcodes alongside the UPC. A shop does not have to use every 2D capability by that date. The GS1 US Sunrise 2027 page gathers the retailer guides.
The format behind this is GS1 Digital Link, a web address that carries the GTIN. The same QR code scans at checkout and opens a product page when a customer points a phone at it. A small retailer's part is making sure the scanner and the POS can handle a QR code that carries a product number instead of a plain web link.
Which barcode should a small retailer use
Keep the brand's UPC or EAN on packaged goods. For items you label yourself, Code 128 with your SKU is the simplest choice. It is compact enough for a shelf edge and every scanner reads it. The free shelf label maker produces it from an SKU of up to 18 characters, or renders an existing UPC-A or EAN-13 with a validated check digit. Keep the SKU short.
Add a QR code when a person with a phone needs to act on it, such as a colleague opening a stock record. Buy an imager rather than a laser the next time a scanner needs replacing. For setting up scanning across counts, receipts and transfers, read barcode inventory for a small shop.
Where Headoffis fits
A Headoffis product record has an optional barcode field for the package's UPC, EAN or GTIN, with the check digit validated and leading zeroes kept. Count, receive and transfer forms take USB and Bluetooth scanners and a camera scan in supported browsers, and a UPC-A matches its 13-digit EAN form. Shelf labels print the product's own UPC or EAN, or a Code 128 of the SKU, with an optional QR code carrying the SKU as plain text or a product stock link. Headoffis does not process checkout or sync with a POS. See inventory and locations and print shelf labels.