A QR code and a Data Matrix are both 2D barcodes, and both can carry a product's GTIN, batch and serial number. The difference is who scans them. QR codes are made for people: every phone camera opens them. Data Matrix codes are made for machines: they're smaller and tougher, and are used where space is tight or the code is marked straight into the product.
Data Matrix and QR code side by side
| QR code | Data Matrix | |
|---|---|---|
| Standard | ISO/IEC 18004 | ISO/IEC 16022 (ECC 200) |
| How to recognize it | Three large squares in the corners | Solid L-shaped edge on two sides, dotted edge on the other two |
| Phone camera | Opens directly | Usually needs a scanning app |
| Size for short data | Larger | Very compact; square or rectangular |
| GS1 version | QR code with a GS1 Digital Link web address | GS1 DataMatrix (FNC1) |
| Typical use | Consumer products, packaging, manuals, passports | Medicines, medical devices, small parts, etched or laser-marked codes |
What a QR code is
A QR code stores data in a square grid of modules, with three finder squares that let a scanner read it from any angle. It can correct for part of the code being damaged, and phones read it with their built-in camera, so it opens a web page without an app.
For products, the GS1 way is to put a GS1 Digital Link web address in the QR code, such as https://example.com/01/09506000134369. A phone opens the product's page, and a retail scanner reads the GTIN from the same address.
What a Data Matrix is
A Data Matrix packs data into a smaller square or rectangle, which makes it the standard for very small items and for codes marked directly onto parts by laser or dot peen. GS1 DataMatrix is the version that carries GS1 data such as GTIN (01), batch (10), expiry date (17) and serial number (21). In the EU it's required on the packs of prescription medicines.
Which one should you use?
- Consumer products and packaging: a QR code with GS1 Digital Link. Shoppers can scan it, and it can carry a product page, registration, support and the passport.
- Very small items or parts: GS1 DataMatrix, because it fits where a QR code can't.
- Medicines and medical devices: GS1 DataMatrix, which healthcare rules and scanners expect.
- Both audiences on one product: some brands print a QR code for people and keep a Data Matrix for production and logistics. Both can carry the same GTIN.
Data carriers and the Digital Product Passport
A Digital Product Passport is reached through a data carrier on the product. The EU Battery Regulation requires a QR code for the battery passport. For other product groups, the Ecodesign Regulation leaves the choice to each group's delegated act. A QR code is the usual choice for consumer products, because the passport has to be easy for anyone to open.
The 2027 move to 2D at the checkout
GS1's target, called Sunrise 2027 in the US and Ambition 2027 globally, is that retail scanners can read the GTIN from 2D barcodes by the end of 2027. Both the QR code with GS1 Digital Link and GS1 DataMatrix count. Linear barcodes such as EAN and UPC stay accepted, so products often carry both during the transition.
Official sources
Frequently asked questions
How can I tell a Data Matrix from a QR code?
Look at the corners. A QR code has three large square markers in three corners. A Data Matrix has a solid L-shaped line along two sides and a dotted pattern along the other two, and no big corner squares.
Can phones scan a Data Matrix code?
Built-in phone camera apps open QR codes straight away. A Data Matrix usually needs a scanning app, which is why codes meant for shoppers are QR codes.
Which is better for product packaging?
For codes shoppers should scan, a QR code with a GS1 Digital Link, because any phone opens it and retail scanners can read the GTIN from it. For very small items or regulated healthcare products, GS1 DataMatrix.
Can a Data Matrix hold more data than a QR code?
No, a QR code has the higher maximum capacity. A Data Matrix is more compact for the short data most products carry, such as a GTIN with a batch and serial number, so it can be printed smaller.
Which one does the Digital Product Passport use?
The battery passport must be reachable through a QR code under the Battery Regulation. For other products, ESPR leaves the data carrier to each product group's rules. A QR code is the usual choice for consumer products.
Will QR codes replace barcodes in 2027?
Not replace. GS1's target is that retail scanners can read 2D codes by the end of 2027. Linear barcodes like EAN and UPC stay accepted, and during the transition products usually carry both.
