Skip to main content
Brands & ManufacturersPrinter Partners
GCC / EN:UAE/KSA/QA/KW/OM/BH
AIQR LogoFree GS1 QR codes

2D barcodes

QR Code vs GS1 DataMatrix: When Does Each Make Sense?

QR Code or GS1 DataMatrix? How the two 2D barcodes differ, which ones work at retail checkout, and how to choose for consumer, healthcare or small packs.

Updated 7 min readbeginner

The short answer

Use a QR code carrying a GS1 Digital Link when consumers should be able to scan the pack with a phone; it also works at 2D-capable retail checkouts. Use GS1 DataMatrix when the code is mainly for supply-chain, regulated or healthcare use, or when space is tight — it is compact and well suited to direct marking, but most phone cameras have nothing to open in it.

  • Separate the symbol (QR or Data Matrix) from what is inside it (a GS1 Digital Link web address or a GS1 element string). The combination is what matters.
  • Three combinations are approved for retail checkout: GS1 DataMatrix, QR Code with GS1 Digital Link, and Data Matrix with GS1 Digital Link. GS1 QR Code with element strings is not.
  • Consumer reach points to QR with a Digital Link; healthcare points to GS1 DataMatrix, because GS1 Digital Link is not used in 2D barcodes in healthcare.
  • Small packs and direct marking favour Data Matrix, because its quiet zone is smaller and element strings are shorter than web addresses.

Two square 2D barcodes now appear on more and more packs: the QR code, familiar from menus and payments, and the Data Matrix, the dense little grid found on medicine boxes and electronic parts. Both can carry GS1 product identity. Choosing between them depends less on the pattern of squares than on who needs to scan the code, what is inside it, and how it will be printed.

Data carriers compared

CarrierWhat it holdsWho reads itTypical useOpens on a phone?
Linear barcode (EAN-13 / UPC-A)GTIN onlyLaser and imaging scanners at checkoutRetail checkout today; nearly universalNot useful to consumers
Plain QR codeAny text, usually a web addressPhones; not interpreted as a product by POSMarketing links, campaignsYes — opens a web page
QR code with GS1 Digital LinkA web address that contains the GTIN and optional batch, serial, expiryPhones, and 2D-capable POS scanners that extract the GTINConsumer-facing packs that also need to scan at checkoutYes — resolves to brand content
GS1 DataMatrixGS1 element string: GTIN plus batch, serial, expiry and more2D imaging scanners; most phone camera apps will not open itHealthcare, regulated and small packs, industrial markingUsually not, without a dedicated app
The barcode is the carrier; the GTIN is the identifier it carries. The same GTIN can be encoded in any of the GS1 carriers above. Which ones a retailer accepts at checkout is set by GS1 guidance and the retailer, so check before changing artwork.

This guide explains the difference and gives practical rules for when each makes sense.

The short version

  • Consumers will scan it? Use a QR code carrying a GS1 Digital Link. Phones open it natively, and it is approved for retail checkout.
  • Healthcare or regulated supply chain? Use GS1 DataMatrix with element strings. It is the established healthcare format, and GS1 Digital Link is not used there.
  • Very small pack or marking directly on the product? Data Matrix usually fits better.
  • Need both consumer reach and a compact symbol? Data Matrix carrying a GS1 Digital Link exists and is approved for retail checkout, though phone support is less predictable than for QR.

The comparison table at the top of this article sets the main carriers side by side.

Symbol versus content: the distinction that matters

A 2D barcode has two layers, and most confusion comes from mixing them up.

The symbol is the printed pattern: QR Code or Data Matrix. QR codes have three large square "finder" patterns in the corners. Data Matrix has a solid L-shaped border on two sides and is often smaller.

The content is the data inside. For GS1 purposes there are two ways to write it:

  • GS1 element string — GS1 data as a sequence of Application Identifiers (AIs) and values, the same system GS1 uses across its barcodes: (01) for GTIN (Global Trade Item Number), (10) for batch, (17) for expiry, (21) for serial. It is compact, but it is not a web address.
  • GS1 Digital Link — the same data written as a web address, such as https://brand.example/01/09506000134352/10/LOT2610. Longer, but a phone can open it. See what GS1 Digital Link is.

Combine the two layers and you get four options:

Symbol + contentUsual nameRetail checkout (Ambition 2027)?Phone opens it?
Data Matrix + element stringGS1 DataMatrixYesNo — nothing to open
QR Code + GS1 Digital LinkQR Code with GS1 Digital LinkYesYes
Data Matrix + GS1 Digital LinkData Matrix with GS1 Digital LinkYesSometimes — depends on the phone
QR Code + element stringGS1 QR CodeNo — out of scopeNo — nothing to open

The last row is a common trap. A "GS1 QR Code" with element strings looks like any other QR code, but it is not one of the approved retail checkout options, and a phone cannot do anything useful with it. If you want a QR code on a retail pack, it should carry a GS1 Digital Link — and for retail, that Digital Link must be uncompressed. The different meanings of the term are untangled in what is a GS1 QR code?

Physical differences that affect your pack

Size for the same data. A web address is longer than the equivalent element string, because it includes the domain and the slashes. Carrying the same GTIN, batch and serial, a Digital Link symbol therefore usually needs more modules (the small squares) than a GS1 DataMatrix holding an element string. A short domain helps.

Clear space. Every barcode needs a blank margin, the quiet zone. For retail 2D codes, GS1 specifies four modules on all sides for QR Code but only one module for Data Matrix. On a tiny label, that difference alone can decide the choice.

Shape. Data Matrix can also be printed as a rectangle, which fits narrow areas such as the edge of a carton or a cap band. QR codes are square.

Module size at retail. For checkout use, GS1 specifies a 2D module size (X-dimension) between 0.396 mm and 0.990 mm, with 0.495 mm as the target, and a minimum print-quality grade of 1.5 (C). These apply to all three approved 2D options, not just one.

When each makes sense

Consumer-facing retail packs

If you want shoppers to scan the pack — for ingredients, instructions, warranty, loyalty or recycling information — a QR code with a GS1 Digital Link is the natural choice. Phone cameras open QR codes without an app, and the same code can be read at 2D-capable checkouts. During the transition it sits next to the EAN/UPC barcode rather than replacing it; see can a GS1 QR code replace a traditional retail barcode?

Healthcare and regulated products

For medicines and medical devices, GS1 DataMatrix with element strings is the established GS1 format, and GS1 states that Digital Link is not used in 2D barcodes in healthcare applications. Healthcare buyers and regulators also set their own rules, which take precedence; check the requirements for each market and product category rather than assuming a single global rule.

Small packs and direct marking

Lipsticks, vials, sachets, cable markers and engraved metal parts have little room. Data Matrix — compact, with a one-module quiet zone and a rectangular option — usually fits where a QR code would not. If consumers also need to scan these products, consider whether the consumer code belongs on the outer carton instead.

Supply-chain and B2B traceability

For codes read mainly by warehouse staff, distributors and installers using scanners or apps, either symbol can work. The question is whether anyone will scan with an ordinary phone. If yes, a Digital Link (usually in a QR code) saves you from asking them to install an app. If no, GS1 DataMatrix keeps the code smaller. Our article on when GS1 2D is a retail opportunity vs a traceability opportunity explores this split.

Printing technology

Product-level codes are identical on every pack and can be printed with the artwork, so any symbol is easy. Batch- and serial-level codes change from unit to unit and must be printed on the line by a coder — continuous inkjet, thermal inkjet, laser or thermal transfer, depending on the material and speed.

A few practical points:

  • Data Matrix is widely used for direct marking with lasers and inkjet coders on curved, small or hard surfaces.
  • Longer Digital Link content means a larger symbol, which matters at high line speeds and on small print heads.
  • Readability on the line is not verification. A camera confirming each code decodes is essential, but grading print quality to the 1.5 (C) minimum is a separate step; see why "printed" is not the same as "verified".

If you are assessing your equipment, our guide to whether your printer can handle serialized 2D codes has a checklist.

A quick decision table

If…Prefer
Consumers should scan it with a phoneQR Code with GS1 Digital Link
It is a medicine or medical deviceGS1 DataMatrix (element string), plus any local regulatory rules
The marking area is tiny or rectangularData Matrix (with element string or Digital Link)
It must scan at retail checkoutAny of the three approved options — never GS1 QR Code with element strings
It will be read only by professional scannersGS1 DataMatrix is usually the most compact

Whichever you choose, the linear barcode stays on general retail packs for now. Why that is — and why it is not a sign of failure — is covered in why 1D and 2D barcodes will coexist.

Generate a QR code with a GS1 Digital Link from your GTIN

Frequently asked questions

Can a pack carry both a QR code and a GS1 DataMatrix?

It can, for example a GS1 DataMatrix required by a healthcare customer plus a QR code for consumers. But every extra code costs space and can confuse scanning, so check what each trading partner actually needs before adding one.

Is a Data Matrix more secure than a QR code?

No. Both are just ways of printing data, and both can be photocopied. Security comes from what the data is — for example unpredictable serial numbers checked by a server — not from the symbol.

Which one is cheaper to print?

The symbol itself costs nothing; the cost is in space, printing equipment and quality control. Static codes can go in artwork for both. For variable codes, check that your coder can print the chosen symbol at the size and grade required at line speed.

Do phones read Data Matrix at all?

Some phone cameras and many scanning apps can decode Data Matrix, but support is less consistent than for QR. Even when a phone decodes a GS1 DataMatrix, the element string inside is not a web address, so there is nothing for it to open.

Sources and further reading

Standards references last reviewed 1 October 2026.