CIRCULATEQR

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.

Common barcode types and their standards
CodeTypeStandardTypical use
UPC-A, EAN-131D linearISO/IEC 15420, GS1Retail checkout
PDF4172D stackedISO/IEC 15438ID cards, shipping labels
Data Matrix2D matrixISO/IEC 16022Small parts, pharmaceutical packs
Aztec2D matrixISO/IEC 24778Transport tickets
QR code2D matrixISO/IEC 18004Links 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.

Learn more

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