What is a 2D barcode?

2026-05-18 · Updated 2026-08-05 · Onpack

A 2D barcode encodes data in two dimensions, in a grid of dark and light modules, instead of the one-dimensional stripes of a traditional barcode. That single change multiplies capacity a thousandfold: a linear EAN carries 13 digits, while a QR code comfortably carries a full web address plus product data. This is the technology behind the retail industry's Sunrise 2027 transition.

The family members you will actually meet

QR code. The square symbol with three corner finder patterns. Native to every modern phone camera, robust error correction, the default carrier for GS1 Digital Link on consumer packaging.

Data Matrix. Smaller footprint at the same data volume, an L-shaped finder pattern, dominant in healthcare (it carries the mandatory identifiers on European medicine packs) and in marking tiny components. Phones read it, but less universally than QR. The comparison for packaging weighs the two.

GS1 DataMatrix and GS1 QR. The same symbols carrying GS1-structured data with Application Identifiers, which is what makes a checkout able to extract a GTIN and price the item.

How the data fits inside

2D symbols grow with their content: a QR code has versions from 21 x 21 modules upward, and more characters mean more modules. Error correction is built in, so a scratched or partly obscured symbol still reads; levels L through H trade capacity for damage tolerance. The practical consequence for packaging is that shorter payloads print smaller, which is why compact Digital Link URIs and short resolver domains matter for the printed size.

Why the technology matters commercially, not just technically

Because the payload can be a URL, a 2D barcode is the first packaging symbol that can speak to consumers, regulators and machines at once. One symbol resolves to a product page for a phone, structured data for a checkout or AI agent, a product passport for an EU inspector, and a recall notice the day one batch goes wrong. The stripes never could.

Getting one on your pack

For a retail product the path is short: take the GTIN you already license, write it as a Digital Link, and print the QR the generator returns, sized to survive the till. The GTIN to QR guide walks it end to end.

Common questions

What is the difference between a QR code and a 2D barcode?

QR is one kind of 2D barcode. The family also includes Data Matrix and others. All encode data in two dimensions; QR is the most phone-friendly and the most common on consumer packaging.

Why is retail moving to 2D barcodes?

Capacity. A linear barcode holds one number; a 2D symbol holds the number plus batch, serial, expiry and a URL, enabling expiry-aware checkout, precise recalls and consumer engagement from one symbol.

Are 2D barcodes harder to print?

No. They are ordinary ink at ordinary print processes. They do have a minimum module size and a mandatory quiet zone, which are layout rules rather than printing difficulties.

Which 2D barcode should a consumer brand choose?

QR, in almost every consumer case: every phone scans it natively. Data Matrix wins in tiny-space and industrial marking contexts, such as electronics and healthcare.

Print a code that stays alive

Generate a conformant GS1 Digital Link for any GTIN, check it fits your label, and host the page behind it. Free at any volume.

Create a code