Published Dec 1, 2026
# What Is a Data Matrix Code?
A Data Matrix code is a square or rectangular grid of dark and light modules that stores data in two dimensions, standardised as ISO/IEC 16022. The version in production everywhere is ECC 200, the only Data Matrix variant with Reed-Solomon error correction, and the only one GS1 recognises. It comes in 24 square sizes, from 10×10 to 144×144 modules, plus 6 rectangular sizes. A 144×144 symbol holds 3,116 digits or 2,335 alphanumeric characters; the smallest, 10×10, holds 6 digits. Because the grid grows in small increments and the margin is one module wide, a Data Matrix code carries a real identifier in an area a QR code of the same data cannot fit.
That is the whole pitch: it is not an alternative to the QR code, it is the answer to a different constraint. Where the marking area is measured in millimetres, or the code has to survive being etched into metal, Data Matrix is the symbol that specification writers reach for.
The two numbers that decide everything
| Property | Value (ECC 200, square form) |
|---|---|
| Symbol sizes | 24 square sizes, 10×10 up to 144×144 modules |
| Rectangular sizes | 6 sizes, 8 to 16 rows and 18 to 48 columns |
| Maximum digits | 3,116 (GS1 DataMatrix with leading FNC1: 3,114) |
| Maximum alphanumeric | 2,335 (GS1 DataMatrix: 2,334) |
| Maximum in rectangular form | 96 digits, 71 alphanumeric |
| Quiet zone | 1 module on each side |
| Error correction | Reed-Solomon, strength set by symbol size, not chosen |
| Correctable damage at large sizes | about 26 to 27 percent of codewords as erasures |
Two properties make the symbol compact. First, the finder pattern is an L-shape: one solid edge and one alternating edge (the clock track) on two adjacent sides, instead of QR's three corner squares. Second, the quiet zone is one module, not QR's four. Both savings matter most at the small end, where a saved module row is a tenth of the printed symbol.
How the symbol is built
Read the grid from the outside in and every part has one job:
- L finder pattern: the solid dark edge fixes size, orientation and distortion. The symbol always has an even number of rows and columns, which leaves a light module in the upper-right corner — a useful tell when you are checking a print proof by eye.
- Clock track: the alternating edge opposite the L. It supplies the row and column count, so the decoder never has to guess the symbol size.
- Data regions: small symbols hold one block of data; from 26×26 up, the grid is split into 4 regions, from 64×64 into 16, and at 120×120 and above into 36. Sub-matrices are why a partially damaged large symbol still decodes: the error-correction code words are spread across regions.
- Padding: if your data does not fill the symbol, the encoder adds pad codeword 129 until it does. The symbol size is chosen by the data, never by how much error protection you would like.
- Encoded mode: GS1 requires ISO/IEC 646 (ASCII) characters; digits pack two per codeword, and extended ASCII characters and spaces are not allowed inside a GS1 DataMatrix.
The older variants — ECC 000, 050, 080, 100 and 140 — still appear in old symbol tables with grids as small as a handful of modules. They have no Reed-Solomon correction and are not what any current application standard means. When you read "Data Matrix" in a spec, it means ECC 200.
The capacity table, size by size
This is the ECC 200 attribute table from ISO/IEC 16022, as reproduced in the GS1 DataMatrix Guideline. Digits column is exactly twice the data codeword count, because numeric compaction packs two digits into one codeword; alphanumeric capacity uses a compaction scheme worth about 1.5 characters per codeword, and plain ASCII text is one character per codeword, which is why GS1 payloads sit between the two columns.
| Symbol | Data regions | Data codewords | Error codewords | Digits | Alphanumeric | ECC share | Correctable errors/erasures |
|---|---|---|---|---|---|---|---|
| 10×10 | 1 × 8×8 | 3 | 5 | 6 | 3 | 62.5% | 2/0 |
| 12×12 | 1 × 10×10 | 5 | 7 | 10 | 6 | 58.3% | 3/0 |
| 14×14 | 1 × 12×12 | 8 | 10 | 16 | 10 | 55.6% | 5/7 |
| 16×16 | 1 × 14×14 | 12 | 12 | 24 | 16 | 50.0% | 6/9 |
| 18×18 | 1 × 16×16 | 18 | 14 | 36 | 25 | 43.8% | 7/11 |
| 20×20 | 1 × 18×18 | 22 | 18 | 44 | 31 | 45.0% | 9/15 |
| 22×22 | 1 × 20×20 | 30 | 20 | 60 | 43 | 40.0% | 10/17 |
| 24×24 | 1 × 22×22 | 36 | 24 | 72 | 52 | 40.0% | 12/21 |
| 26×26 | 1 × 24×24 | 44 | 28 | 88 | 64 | 38.9% | 14/25 |
| 32×32 | 4 × 14×14 | 62 | 36 | 124 | 91 | 36.7% | 18/33 |
| 36×36 | 4 × 16×16 | 86 | 42 | 172 | 127 | 32.8% | 21/39 |
| 40×40 | 4 × 18×18 | 114 | 48 | 228 | 169 | 29.6% | 24/45 |
| 44×44 | 4 × 20×20 | 144 | 56 | 288 | 214 | 28.0% | 28/53 |
| 48×48 | 4 × 22×22 | 174 | 68 | 348 | 259 | 28.1% | 34/65 |
| 52×52 | 4 × 24×24 | 204 | 84 | 408 | 304 | 29.2% | 42/78 |
| 64×64 | 16 × 14×14 | 280 | 112 | 560 | 418 | 28.6% | 56/106 |
| 72×72 | 16 × 16×16 | 368 | 144 | 736 | 550 | 28.1% | 72/132 |
| 80×80 | 16 × 18×18 | 456 | 192 | 912 | 682 | 29.6% | 96/180 |
| 88×88 | 16 × 20×20 | 576 | 224 | 1152 | 862 | 28.0% | 112/212 |
| 96×96 | 16 × 22×22 | 696 | 272 | 1392 | 1042 | 28.1% | 136/260 |
| 104×104 | 16 × 24×24 | 816 | 336 | 1632 | 1222 | 29.2% | 168/318 |
| 120×120 | 36 × 18×18 | 1050 | 408 | 2100 | 1573 | 28.0% | 204/390 |
| 132×132 | 36 × 20×20 | 1304 | 496 | 2608 | 1954 | 27.6% | 248/472 |
| 144×144 | 36 × 22×22 | 1558 | 620 | 3116 | 2335 | 28.5% | 310/590 |
Read the ECC share column from the top down and the design logic appears. A 10×10 symbol spends 62.5 percent of its codewords on protection, which is why the smallest codes survive handling damage almost absurdly well. A 144×144 spends 28.5 percent, similar to QR's middle error-correction levels. You cannot trade protection for capacity at a fixed size: add a character and the encoder may jump you a whole size, changing both.
What your payload actually needs
GS1 DataMatrix puts a leading FNC1 codeword in position one, which is what makes a scanner report it as ]d2 and parse Application Identifiers. Work through real element strings, counting characters and adding that one codeword:
| Payload (human readable) | Encoded characters | Codewords | Smallest symbol | Its capacity |
|---|---|---|---|---|
| (01)03453120000011 — GTIN only | 16 | 17 | 18×18 | 18 codewords, 36 digits |
| (01)…(17)191125(10)ABCD1234 — GTIN, best before, batch | 34 | 35 | 24×24 | 36 codewords, 72 digits |
| (01)…(17)190508(10)ABCD1234(21)10 — plus serial | 38 | 39 | 26×26 | 44 codewords, 88 digits |
| (01)…(21) plus a 20-character serial — UDI style | 38 | 39 | 26×26 | 44 codewords, 88 digits |
The useful rule of thumb: a GS1 identity payload with GTIN, date and batch lands in a 24×24 or 26×26 grid, i.e. 26 or 28 modules across including the quiet zone. A GTIN on its own needs 18×18. If your application standard also wants a long serial, expect the next size step.
How small can it be printed
Printed width equals modules plus two quiet modules, multiplied by the module size (the X-dimension). Calculated side lengths, including the quiet zone:
| Symbol | at 0.152 mm | at 0.254 mm | at 0.493 mm | at 0.615 mm |
|---|---|---|---|---|
| 14×14 | 2.43 mm | 4.06 mm | 7.89 mm | 9.84 mm |
| 18×18 | 3.04 mm | 5.08 mm | 9.86 mm | 12.30 mm |
| 24×24 | 3.95 mm | 6.60 mm | 12.82 mm | 15.99 mm |
| 26×26 | 4.26 mm | 7.11 mm | 13.80 mm | 17.22 mm |
| 32×32 | 5.17 mm | 8.64 mm | 16.76 mm | 20.91 mm |
| 40×40 | 6.38 mm | 10.67 mm | 20.71 mm | 25.83 mm |
| 64×64 | 10.03 mm | 16.76 mm | 32.54 mm | 40.59 mm |
| 144×144 | 22.19 mm | 37.08 mm | 71.98 mm | 89.79 mm |
The module size you can actually print is quantised by the printer's dot grid, and the rounding is not always in your favour:
| Printer | Target 0.25 mm | Target 0.40 mm | Target 0.615 mm |
|---|---|---|---|
| 203 dpi (dot 0.125 mm) | 2 dots = 0.250 mm (+0.1%) | 4 dots = 0.500 mm (+25.1%) | 5 dots = 0.626 mm (+1.7%) |
| 300 dpi (dot 0.085 mm) | 3 dots = 0.254 mm (+1.6%) | 5 dots = 0.423 mm (+5.8%) | 8 dots = 0.677 mm (+10.1%) |
| 600 dpi (dot 0.042 mm) | 6 dots = 0.254 mm (+1.6%) | 10 dots = 0.423 mm (+5.8%) | 15 dots = 0.635 mm (+3.3%) |
| 1200 dpi (dot 0.021 mm) | 12 dots = 0.254 mm (+1.6%) | 19 dots = 0.402 mm (+0.5%) | 30 dots = 0.635 mm (+3.3%) |
A 203 dpi thermal-transfer printer is the classic label machine and the worst of the four for a 0.40 mm target: it cannot print 3.2 dots, so it prints 4 and your symbol grows by a quarter. Specify the module size in dots for the machine that will print the job, not in millimetres, and the surprise disappears.
Same data, different footprint
Measured against our own QR capacity figures (QR in byte mode, level L, so the comparison is the phone-friendly case):
| Data | Data Matrix | QR code | DM : QR in modules |
|---|---|---|---|
| 10 bytes | 16×16 (256) | v1, 21×21 (441) | 0.58 |
| 17 bytes | 18×18 (324) | v1, 21×21 (441) | 0.73 |
| 35 bytes | 24×24 (576) | v3, 29×29 (841) | 0.68 |
| 45 bytes | 32×32 (1024) | v3, 29×29 (841) | 1.22 |
| 55 bytes | 32×32 (1024) | v4, 33×33 (1089) | 0.94 |
| 64 bytes | 36×36 (1296) | v4, 33×33 (1089) | 1.19 |
| 100 bytes | 40×40 (1600) | v5, 37×37 (1369) | 1.17 |
| 250 bytes | 64×64 (4096) | v10, 57×57 (3249) | 1.26 |
| 500 bytes | 88×88 (7744) | v15, 77×77 (5929) | 1.31 |
| 1500 bytes | 144×144 (20736) | v28, 129×129 (16641) | 1.25 |
The crossover for byte payloads sits at about 40 bytes at level L, not at some vague "small data" threshold. Below it Data Matrix prints a genuinely smaller symbol; above it QR wins on area, and the gap widens until both hit their ceiling. QR's ceiling is higher: 2,953 bytes against roughly 1,556 ASCII characters for Data Matrix. If you are encoding a URL, a vCard or a document, Data Matrix is the wrong tool. This is the trade-off laid out side by side in QR code vs Data Matrix, and the QR-side numbers are in QR code capacity.
Rectangular symbols, and when to use them
The six rectangular sizes range from 8 rows by 18 columns up to 16 by 48, and they top out at 96 digits or 71 alphanumeric characters. They exist because some print paths — a strip along a pipe, a band on a vial, a line that moves under a fixed print head — cannot accept a square. The price is capacity, and the second price is that rectangular symbols see far less marking equipment configured for them. If a square fits, print the square.
Marking, contrast and proving it reads
- Direct part marking. Data Matrix is the default symbol for codes etched or deformed into the part itself: fibre laser ablation, dot peen, inkjet and electrolytic marking all produce it, with modules down in the 0.1 to 0.3 mm range on metal. Etched marks have almost no colour contrast, which is one more place where the L-shape and the small quiet zone help: an imaging reader with grayscale processing finds the clock track rather than relying on a strong black-on-white edge.
- Contrast. A printed Data Matrix can invert — light modules on a dark field — and readers handle it far more often than with QR, but treat inversion as a risk to test, not a feature to rely on. Print-quality standards measure symbol contrast between the darkest and lightest elements and grade the result.
- Verification. Print quality for two-dimensional symbols is graded under ISO/IEC 15415; direct part marks under ISO/IEC 29158. A verifier is not optional equipment in those environments: it is how you prove the mark on 10,000 parts reads on the customer's reader rather than only on yours.
- Scanning. Data Matrix needs an imaging reader — camera or CCD. A laser slot scanner that reads EAN-13 all day cannot see it. Phone camera support is real but uneven, so customer-facing scanning should be planned on QR, as covered in minimum QR code size for the consumer side.