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
| Carrier | What it holds | Who reads it | Typical use | Opens on a phone? |
|---|---|---|---|---|
| Linear barcode (EAN-13 / UPC-A) | GTIN only | Laser and imaging scanners at checkout | Retail checkout today; nearly universal | Not useful to consumers |
| Plain QR code | Any text, usually a web address | Phones; not interpreted as a product by POS | Marketing links, campaigns | Yes — opens a web page |
| QR code with GS1 Digital Link | A web address that contains the GTIN and optional batch, serial, expiry | Phones, and 2D-capable POS scanners that extract the GTIN | Consumer-facing packs that also need to scan at checkout | Yes — resolves to brand content |
| GS1 DataMatrix | GS1 element string: GTIN plus batch, serial, expiry and more | 2D imaging scanners; most phone camera apps will not open it | Healthcare, regulated and small packs, industrial marking | Usually not, without a dedicated app |
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 + content | Usual name | Retail checkout (Ambition 2027)? | Phone opens it? |
|---|---|---|---|
| Data Matrix + element string | GS1 DataMatrix | Yes | No — nothing to open |
| QR Code + GS1 Digital Link | QR Code with GS1 Digital Link | Yes | Yes |
| Data Matrix + GS1 Digital Link | Data Matrix with GS1 Digital Link | Yes | Sometimes — depends on the phone |
| QR Code + element string | GS1 QR Code | No — out of scope | No — 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 phone | QR Code with GS1 Digital Link |
| It is a medicine or medical device | GS1 DataMatrix (element string), plus any local regulatory rules |
| The marking area is tiny or rectangular | Data Matrix (with element string or Digital Link) |
| It must scan at retail checkout | Any of the three approved options — never GS1 QR Code with element strings |
| It will be read only by professional scanners | GS1 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