QR code glossary · QR code basics
2D barcode
Also called: Two-dimensional barcode
Definition
A 2D barcode is a barcode that stores data across both the width and the height of its pattern, unlike a 1D (linear) barcode such as a UPC, which stores a short number in the widths of its bars; QR codes, Data Matrix, Aztec and PDF417 are all 2D barcodes.
How it works
A 1D barcode is read along a single line. The UPC-A codes on North American products hold 12 digits and EAN-13 codes hold 13: a product number that the checkout system looks up in its own database. The only protection against misreads is a check digit.
A 2D barcode uses the second dimension to hold far more. Stacked codes such as PDF417 pile rows of short barcodes on top of each other. Matrix codes such as QR, Data Matrix and Aztec use a grid of square modules and are read with a camera rather than a laser line. They also carry error correction, so they can be read when partly damaged. A QR code can hold up to 7,089 digits or 2,953 bytes, enough for a full web address, a contact card or a WiFi login rather than just a number.
| Code | Type | Standard | Typical use |
|---|---|---|---|
| UPC-A, EAN-13 | 1D linear | ISO/IEC 15420, GS1 | Retail checkout |
| PDF417 | 2D stacked | ISO/IEC 15438 | ID cards, shipping labels |
| Data Matrix | 2D matrix | ISO/IEC 16022 | Small parts, pharmaceutical packs |
| Aztec | 2D matrix | ISO/IEC 24778 | Transport tickets |
| QR code | 2D matrix | ISO/IEC 18004 | Links for consumers, payments, marketing |
Why it matters
“QR code vs barcode” is a question about the kind of barcode, not a choice between two technologies: a QR code is a barcode, of the 2D matrix kind. The practical differences are what each holds and what reads it. Phone camera apps are built to recognize QR codes and act on their content, which is why QR codes dominate anything meant for the public. Linear barcodes remain the standard at checkouts, and Data Matrix is common where codes must be tiny, such as on electronic parts and medicine packs.
The two worlds are converging in retail. GS1’s 2D retail guideline sets an ambition for checkout scanners worldwide to read product numbers from 2D barcodes by the end of 2027, known in the US as Sunrise 2027, using either GS1 DataMatrix or a QR code that carries a GS1 Digital Link address. GS1 calls it a voluntary transition and says linear barcodes will stay in use, so packaging keeps its UPC or EAN alongside any QR code.
Related terms
- QR codeA QR code (Quick Response code) is a square two-dimensional barcode, standardized as ISO/IEC 18004, that stores data such as a web address, contact card or WiFi login in a grid of dark and light squares that a phone camera can read in any orientation.
- Micro QR codeA Micro QR code is a smaller variant of the QR code, defined in the same standard (ISO/IEC 18004), that uses a single finder pattern and a 2-module quiet zone to fit up to 35 digits in a symbol of 11 × 11 to 17 × 17 modules.
- GS1 Digital LinkGS1 Digital Link is a GS1 standard for writing product identifiers, such as a GTIN with an optional batch or serial number, as an ordinary web address, so one QR code can open a page for shoppers and also give the product number to checkout and supply-chain scanners.
- Data capacityData capacity is the most content a QR code can hold, which depends on its version, error correction level and encoding mode; the largest code, version 40 at level L, holds 7,089 numeric digits, 4,296 alphanumeric characters, 2,953 bytes or 1,817 kanji characters.
- Reed–Solomon error correctionReed–Solomon error correction is a family of error-correcting codes, published by Irving Reed and Gustave Solomon in 1960, that QR codes use to add calculated check codewords to their data so a scanner can find and repair codewords it misread.
Learn more
- QR codes on packaging: What to link to, print specs and the GS1 transition.
- QR codes for product packaging: How brands use codes on products.
Sources
Last updated . Written by the CirculateQR team; technical facts follow the sources listed above. Example codes and sizes are computed with the open-source qrcode encoder that CirculateQR uses. Spotted something wrong? Email support@circulateqr.com. QR Code is a registered trademark of DENSO WAVE INCORPORATED.
← Browse the full glossary