Use a QR code when people will scan it with their phones: links, menus, payments, Wi-Fi, marketing. Use Data Matrix for small industrial and regulated marking: medicine packs (GS1 DataMatrix), electronic parts, and items marked directly on metal or plastic. Data Matrix fits more data into a smaller square and needs only a one-module margin; QR codes are recognised instantly by every phone camera and hold more data at their largest size.
From a distance they look like cousins: black and white squares in a grid. Look closer and the differences show up. A QR code has three large squares in its corners. A Data Matrix has an L-shaped solid border on two sides and a dotted pattern on the other two. Those features tell the scanner how the code is positioned, and they also hint at what each was designed for.
Side by side
| QR code | Data Matrix (ECC 200) | |
|---|---|---|
| Recognise it by | Three large squares in the corners | Solid L-shaped border and a dotted edge |
| Largest capacity | 7,089 digits or 2,953 bytes | 3,116 digits or 1,556 bytes |
| Error correction | Choose L, M, Q or H (about 7 to 30%) | Fixed Reed-Solomon correction |
| Blank margin needed | 4 modules | 1 module |
| Size for small amounts of data | Larger | Very compact, can be a few millimetres |
| Phone cameras | Read by the built-in camera app | Usually needs a scanner app |
| Typical use | Consumer: links, payments, menus, tickets | Industry: medicines, parts, electronics, postage |
Where Data Matrix wins
- Very small spaces. A serial number on a circuit board, a surgical instrument or a tiny vial. Data Matrix stays readable at sizes where a QR code wouldn’t fit its quiet zone.
- Direct part marking. Laser-etched or dot-peened onto metal and plastic, where it has to survive scratches, oil and heat.
- Medicines. GS1 DataMatrix carries the product number, serial number, batch and expiry date on packs in many countries’ anti-counterfeiting and traceability systems.
- Postage and logistics. Postal services print it on labels and stamps because it’s compact and reliable.
Where QR wins
- Anything aimed at the public. Every modern phone camera recognises a QR code without an app. That’s decisive for marketing, menus, payments and tickets.
- Large amounts of data, such as a full vCard or a long Wi-Fi password.
- Design freedom. With high error correction, a QR code can carry a small logo and brand colours and still scan. Here’s how far you can push it.
GS1 Sunrise 2027
GS1, the organisation that manages product barcodes, has set a target known as Sunrise 2027: by the end of 2027, retail checkout scanners should be able to read 2D barcodes as well as the familiar EAN and UPC stripes. Both QR codes with GS1 data (GS1 Digital Link) and GS1 DataMatrix are part of it. The idea is that one code on a pack can serve the checkout, carry batch and expiry details for stock control and recalls, and link shoppers to product information. Linear EAN and UPC barcodes aren’t disappearing overnight; for now, many products carry both.
Which should you use?
| Your situation | Use |
|---|---|
| Customers will scan it with a phone | QR code |
| Medicine or healthcare packaging with GS1 data | GS1 DataMatrix |
| Marking small parts or tools for your own tracking | Data Matrix |
| A retail product’s checkout code today | EAN-13 or UPC-A (from GS1) |
| Shipping labels with batch and expiry | GS1-128 |
Test before you print
Whichever you choose, print a sample at the real size and scan it with the device that will actually be used: a warehouse scanner for Data Matrix, two or three different phones for QR codes. The Barcode Reader reads both from a camera or an image file.
Frequently asked questions
What is the difference between Data Matrix and QR code?
Can a phone read a Data Matrix code?
Which holds more data, QR or Data Matrix?
Why do medicines use Data Matrix?
What is GS1 Sunrise 2027?
Create a Data Matrix code
Plain text or GS1 DataMatrix with GTIN, serial, batch and expiry. Download as vector.
Open Data Matrix Generator