CodeBox Hub
FREE

QR Code vs Data Matrix: When the Smaller Grid Wins

QR vs Data Matrix: capacity, module grid, error correction, small-size legibility and DPM direct part marking, with a side-by-side comparison table.

# 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

DimensionData Matrix (ISO/IEC 16022)QR code (ISO/IEC 18004)Advantage
StandardISO/IEC 16022, first edition 1995ISO/IEC 18004, first edition 1998-
Shape28 square sizes plus 3 rectangular (6×8, 8×18, 8×32)Square only, versions 1 to 40Data Matrix
Position detectionL-shaped mark on two adjacent edgesThree finder patterns in three corners-
Minimum grid2×2 modules21×21 (Version 1)Data Matrix
Maximum grid144×144177×177 (Version 40)QR
Max byte capacity2,335 characters (144×144)2,953 bytes (Version 40, level L)QR
Max numeric capacity4,471 digits (144×144)7,089 digits (Version 40, level L)QR
Data modesNumeric, alphanumeric, ASCII, C1 control, 8-bitNumeric, alphanumeric, byte, kanjiQR
Error correctionReed-Solomon, level fixed by grid sizeL, M, Q, H selectable, 7% to 30% recoveryQR
DPM laser etchingIndustry standard (GS1 DataMatrix)Rarely etched, not the DPM defaultData Matrix
Phone camera supportWorks in most camera apps, unevenNative in every phone cameraQR
Core industriesAerospace and automotive DPM, medical, electronicsPayments, 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:

PayloadData MatrixQR codeModule ratio (DM : QR)
10-digit part number, numeric mode14×14 (196 modules)Version 1, 21×21 (441)1 : 2.2
30-byte ASCII part record22×22 (484)Version 3, 29×29 (841)1 : 1.7
50-byte ASCII part record32×32 (1,024)Version 4, 33×33 (1,089)1 : 1.1
100-byte ASCII part record40×40 (1,600)Version 5, 37×37 (1,369)1.2 : 1
500-byte ASCII part record96×96 (9,216)Version 15, 77×77 (5,929)1.6 : 1
2,000-byte part record144×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.

FAQ

What is the difference between a QR code and a Data Matrix code?

Both are 2D matrix codes with Reed-Solomon correction. QR (ISO/IEC 18004) is square with three corner finder patterns and holds up to 2,953 bytes; Data Matrix (ISO/IEC 16022) is smaller at every short payload and is the DPM etching standard.

Which one stores more data?

QR: 2,953 bytes or 7,089 numeric digits at version 40 level L, against 2,335 bytes or 4,471 digits for a 144×144 Data Matrix.

Why do manufacturers etch Data Matrix instead of QR codes?

Etching happens at 0.1 to 0.2 mm modules, where Data Matrix's compact grid and L-shaped mark survive better, and GS1's DPM requirements standardize on it.

Can my phone scan a Data Matrix code?

Usually yes through a camera app, but support is less consistent than for QR. For customer-facing scanning, plan on QR.

What is DPM, direct part marking?

Marking the ID symbol directly onto the part itself, typically by laser, so the code cannot be separated from the part. Data Matrix is the standard symbology for it.

Is Data Matrix part of the GS1 standard?

Yes. GS1's General Specifications define the GS1 DataMatrix for applications including UDI and DPM.

Which is better for a small part label?

Below about 100 bytes of data, Data Matrix: in our test a 10-digit ID is 196 modules as Data Matrix versus 441 as QR.

Can a label carry both a QR code and a Data Matrix code?

Yes, commonly done when one symbol serves the phone and the other serves a fixed scanner. Keep the quiet zones clear and the symbols separated.

Keep reading

Contact us