Published Oct 27, 2026
# QR Code vs Data Matrix: When the Smaller Grid Wins
A Data Matrix code (ISO/IEC 16022) is a compact square or rectangular module matrix built for dense, tiny, permanently marked data. The QR code (ISO/IEC 18004) is the phone-camera workhorse with up to 2,953 bytes and four selectable error-correction levels. For DPM etching, small part tags and medical device labels, Data Matrix wins on size. For payments, marketing and anything scanned by a consumer phone, QR wins.
Where the two symbols come from
Data Matrix originated in the late 1980s and was standardized as ISO/IEC 16022 in 1995, a decade before QR; the Wikipedia entry on Data Matrix notes the same timeline. QR is Denso Wave's 1994 invention, standardized as ISO/IEC 18004 in 1998. Both encode data in a grid of square modules with Reed-Solomon error correction; everything else is a design choice for a different job.
Structure at a glance
- Position detection: QR places three square finder patterns in three corners plus a timing pattern; Data Matrix uses an L-shaped mark, one solid and one alternating line on two adjacent edges; the grid size is part of the format, so less detection is needed.
- Shape: QR is square only. Data Matrix adds three rectangular sizes (6×8, 8×18, 8×32) to its 28 square sizes, from 2×2 to 144×144.
- Minimum size: Data Matrix goes down to 2×2 modules; QR Version 1 starts at 21×21.
Capacity and geometry, side by side
| Dimension | Data Matrix (ISO/IEC 16022) | QR code (ISO/IEC 18004) | Advantage |
|---|---|---|---|
| Standard | ISO/IEC 16022, first edition 1995 | ISO/IEC 18004, first edition 1998 | - |
| Shape | 28 square sizes plus 3 rectangular (6×8, 8×18, 8×32) | Square only, versions 1 to 40 | Data Matrix |
| Position detection | L-shaped mark on two adjacent edges | Three finder patterns in three corners | - |
| Minimum grid | 2×2 modules | 21×21 (Version 1) | Data Matrix |
| Maximum grid | 144×144 | 177×177 (Version 40) | QR |
| Max byte capacity | 2,335 characters (144×144) | 2,953 bytes (Version 40, level L) | QR |
| Max numeric capacity | 4,471 digits (144×144) | 7,089 digits (Version 40, level L) | QR |
| Data modes | Numeric, alphanumeric, ASCII, C1 control, 8-bit | Numeric, alphanumeric, byte, kanji | QR |
| Error correction | Reed-Solomon, level fixed by grid size | L, M, Q, H selectable, 7% to 30% recovery | QR |
| DPM laser etching | Industry standard (GS1 DataMatrix) | Rarely etched, not the DPM default | Data Matrix |
| Phone camera support | Works in most camera apps, uneven | Native in every phone camera | QR |
| Core industries | Aerospace and automotive DPM, medical, electronics | Payments, marketing, logistics, consumer | - |
Same payload, different grids: our test
We encoded the same payloads in both symbologies (QR at level L; Data Matrix error correction is fixed by grid size in the standard) and compared the resulting grids:
| Payload | Data Matrix | QR code | Module ratio (DM : QR) |
|---|---|---|---|
| 10-digit part number, numeric mode | 14×14 (196 modules) | Version 1, 21×21 (441) | 1 : 2.2 |
| 30-byte ASCII part record | 22×22 (484) | Version 3, 29×29 (841) | 1 : 1.7 |
| 50-byte ASCII part record | 32×32 (1,024) | Version 4, 33×33 (1,089) | 1 : 1.1 |
| 100-byte ASCII part record | 40×40 (1,600) | Version 5, 37×37 (1,369) | 1.2 : 1 |
| 500-byte ASCII part record | 96×96 (9,216) | Version 15, 77×77 (5,929) | 1.6 : 1 |
| 2,000-byte part record | 144×144 (20,736) | Version 32, 145×145 (21,025) | 1 : 1 |
The crossover sits around 100 bytes: below it, Data Matrix prints a smaller grid (196 versus 441 modules for a 10-digit ID), and beyond it, QR's larger versions pack the data tighter. At the top of the range the two land on nearly the same footprint, 144 to 145 modules across.
Why DPM standardizes on Data Matrix
Direct part marking etches the ID directly onto the part with a fiber laser, at 0.1 to 0.2 mm modules. GS1's General Specifications make DataMatrix the two-dimensional symbol for this job, and automotive and aerospace part-marking requirements build on it. In our comparison at a 0.15 mm module, a 10-digit ID etches 2.1 mm across as a 14×14 Data Matrix versus 3.15 mm as a Version 1 QR. QR's proportionally larger finder patterns and four-module quiet zone are a real penalty where marking areas are measured in millimeters. The compact L-shaped mark and narrow margin are exactly why etched parts carry Data Matrix.
For medical device labels, FDA UDI rules accept QR, DataMatrix, PDF417 and Codabar; GS1's UDI implementation uses DataMatrix, so a label that talks to the GS1 ecosystem defaults to it.
Error correction: fixed versus selectable
QR lets you choose L (7%), M (15%), Q (25%) or H (30%) recovery, covered in QR error correction. Data Matrix also uses Reed-Solomon, but the strength is fixed by grid size in the standard, not chosen per label. Small Data Matrix grids therefore carry a heavier ECC overhead relative to their data, which is part of why they stay legible at etched sizes where one scratched QR finder module would be fatal.
Where QR still wins
- Phone-first scanning: every phone camera decodes QR out of the box; Data Matrix support varies by camera app.
- Long payloads: 2,953 bytes and 7,089 numeric digits, with the full QR code capacity table.
- Consumer recognition: QR is a known symbol; Data Matrix reads as noise to customers.
- Kanji: QR's byte and kanji modes cover use cases Data Matrix has no mode for.
Choosing between them
- Etched on metal or plastic parts (aerospace, automotive, electronics): Data Matrix.
- Medical device UDI labels in the GS1 world: Data Matrix.
- Small tags under about 100 bytes where every millimeter matters: Data Matrix.
- Long URLs, records, payments, anything phone-scanned: QR.
- Both on one label: lay them out side by side in the label maker; the symbol-choice background is in QR code vs barcode on labels.
Generate the QR side with the QR code generator verify with the QR scanner, and pair it with 1D symbols from the barcode generator when a label needs both. Background reading: what is a QR code, minimum QR code size, barcode symbologies.