Data Matrix vs QR Code for Part Marking
Both are 2D codes and both can be laser-marked, but they are not interchangeable. Data Matrix is smaller for the same data, tolerates a one-module quiet zone, and is what MIL-STD-130 and most direct part marking standards specify. QR reads on any phone and suits labels and asset tags. This guide compares them and says when each is the right call.
- Updated
- 2026-10-03
- Length
- 1074 words
Engineers specifying a part mark often write "2D barcode" on the drawing and leave the symbology to whoever marks it. That works until a reader on the customer's line cannot decode it, or an auditor asks why the symbol on an IUID part is a QR code. The two common 2D symbologies are different enough that the choice should be on the drawing.
The short answer
- Data Matrix for direct part marking, serialization, IUID, UDI on devices, and anything read by industrial scanners or verifiers. It is smaller, tolerates a tighter quiet zone, and is what the standards call for.
- QR code for labels and tags that people will scan with a phone: asset tags, equipment service tags, links to documentation. It is what consumer devices decode natively.
How the two are built
Both are matrix symbologies: a grid of dark and light square modules carrying data with Reed–Solomon error correction. They differ in how the reader finds and orients the symbol.
Data Matrix (ECC 200) uses an L-shaped solid border on two sides, the finder pattern, and an alternating dark–light pattern on the other two, the timing pattern. Those two features let the reader locate the symbol, determine its size, and correct for distortion. Symbols are square from 10×10 to 144×144 modules, with rectangular sizes as well. ECC 200 is the current version and the only one modern standards accept.
QR code uses three large square finder patterns in three corners plus smaller alignment patterns inside larger symbols. Those finders make a QR code easy for a phone camera to lock onto from any angle, at the cost of modules spent on structure rather than data. Versions run from 21×21 to 177×177 modules.
Size for the same data
Because Data Matrix spends fewer modules on finder structure, it encodes the same data in a smaller symbol. For a typical part-marking payload, say a 25-character serial string:
| Symbology | Symbol | Modules per side |
|---|---|---|
| Data Matrix ECC 200 | 18×18 | 18 |
| QR code, error correction M | Version 2, 25×25 | 25 |
At a module size of 0.015 in., that is a 0.27 in. Data Matrix against a 0.375 in. QR, before quiet zones. On a fastener head or a 1/4 in. hex flat, that difference decides whether the mark fits. The mark size calculator works it out for any data string.
Quiet zone
The quiet zone is the blank margin around the symbol that the reader needs to separate it from the surroundings.
- Data Matrix requires a quiet zone of one module on each side under ISO/IEC 16022. Direct part marking guidance commonly recommends more, but the minimum is small.
- QR code requires a quiet zone of four modules on each side.
On a crowded part, four modules of blank space on every side is often the constraint, not the symbol itself.
Error correction
Both recover from damage, in different ways.
- Data Matrix ECC 200 has a fixed error correction level per symbol size, recovering from roughly 25 to 30 percent of damaged codewords depending on size. There is no user choice; the symbol size sets it.
- QR code offers four selectable levels: L (about 7 percent), M (15 percent), Q (25 percent), H (30 percent). Higher levels mean larger symbols for the same data.
For direct part marks that will see abrasion or partial coating, Data Matrix at its fixed level is usually sufficient and is what verifiers expect. A QR code at level H matches it but grows accordingly.
Which standards specify which
| Standard or program | Symbology |
|---|---|
| MIL-STD-130 (DoD IUID) | Data Matrix ECC 200, required |
| AS9132 (aerospace direct part marking) | Data Matrix |
| AIAG B-17 (automotive 2D direct part marking) | Data Matrix or QR |
| GS1 / FDA UDI on medical devices | Data Matrix or QR; Data Matrix is the common choice for direct marks |
| ISO/IEC 15415 (print quality) and AIM DPM-1-2006 | Grading methods applicable to both; AIM DPM is written around Data Matrix |
| ATA Spec 2000 (aerospace parts) | Data Matrix |
If a drawing invokes MIL-STD-130, there is no choice: the symbol is a Data Matrix. If it invokes a UDI or AIAG program, read the customer's requirement; most default to Data Matrix for direct marks and allow QR on labels.
Reading in the field
Here QR wins. Every smartphone decodes a QR code with its camera app; many decode Data Matrix only with a dedicated scanning app. If the point of the mark is that a technician, auditor, or customer scans it with a phone and lands on a service record, QR is the right symbology. That is why asset tags and equipment service tags normally carry QR.
Industrial fixed-mount and handheld scanners read both, and verifiers grade both.
Marking considerations on metal
Both symbologies mark the same way under a fiber laser: the modules are annealed, etched, or ablated into the surface. Two practical differences:
- Data Matrix's solid L-finder is a long continuous dark line; on a reflective surface the reader relies on it, so surface finish along that edge matters. Matte and bead-blasted finishes read most consistently.
- QR's three finder squares are large and robust, which helps on low-contrast substrates, but the four-module quiet zone has to be clean metal with nothing marked in it.
Module size for either is set by the substrate texture and the reader, not by the laser; a laser can mark modules far smaller than a scanner can resolve on a textured surface.
Deciding
| If the mark is… | Use |
|---|---|
| An IUID mark under MIL-STD-130 | Data Matrix |
| A direct part mark on a small or crowded part | Data Matrix |
| Read by industrial scanners or a verifier | Data Matrix |
| A label or tag scanned with a phone | QR |
| Linking to a URL, manual, or service record | QR |
| Required by the customer's drawing or program | Whatever it says |
When the drawing is silent, Data Matrix for the part and QR for the tag is the default that rarely needs revisiting. The Data Matrix generator produces a correct ECC 200 symbol from any string for the drawing or the RFQ.