CodeBox Hub
FREE

What Is a Data Matrix Code?

Data Matrix ECC 200 comes in 24 square sizes, from 10×10 to 144×144 modules, and holds up to 3,116 digits. Here are the capacity tables and the print math.

# 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

PropertyValue (ECC 200, square form)
Symbol sizes24 square sizes, 10×10 up to 144×144 modules
Rectangular sizes6 sizes, 8 to 16 rows and 18 to 48 columns
Maximum digits3,116 (GS1 DataMatrix with leading FNC1: 3,114)
Maximum alphanumeric2,335 (GS1 DataMatrix: 2,334)
Maximum in rectangular form96 digits, 71 alphanumeric
Quiet zone1 module on each side
Error correctionReed-Solomon, strength set by symbol size, not chosen
Correctable damage at large sizesabout 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.

SymbolData regionsData codewordsError codewordsDigitsAlphanumericECC shareCorrectable errors/erasures
10×101 × 8×8356362.5%2/0
12×121 × 10×105710658.3%3/0
14×141 × 12×12810161055.6%5/7
16×161 × 14×141212241650.0%6/9
18×181 × 16×161814362543.8%7/11
20×201 × 18×182218443145.0%9/15
22×221 × 20×203020604340.0%10/17
24×241 × 22×223624725240.0%12/21
26×261 × 24×244428886438.9%14/25
32×324 × 14×1462361249136.7%18/33
36×364 × 16×16864217212732.8%21/39
40×404 × 18×181144822816929.6%24/45
44×444 × 20×201445628821428.0%28/53
48×484 × 22×221746834825928.1%34/65
52×524 × 24×242048440830429.2%42/78
64×6416 × 14×1428011256041828.6%56/106
72×7216 × 16×1636814473655028.1%72/132
80×8016 × 18×1845619291268229.6%96/180
88×8816 × 20×20576224115286228.0%112/212
96×9616 × 22×226962721392104228.1%136/260
104×10416 × 24×248163361632122229.2%168/318
120×12036 × 18×1810504082100157328.0%204/390
132×13236 × 20×2013044962608195427.6%248/472
144×14436 × 22×2215586203116233528.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 charactersCodewordsSmallest symbolIts capacity
(01)03453120000011 — GTIN only161718×1818 codewords, 36 digits
(01)…(17)191125(10)ABCD1234 — GTIN, best before, batch343524×2436 codewords, 72 digits
(01)…(17)190508(10)ABCD1234(21)10 — plus serial383926×2644 codewords, 88 digits
(01)…(21) plus a 20-character serial — UDI style383926×2644 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:

Symbolat 0.152 mmat 0.254 mmat 0.493 mmat 0.615 mm
14×142.43 mm4.06 mm7.89 mm9.84 mm
18×183.04 mm5.08 mm9.86 mm12.30 mm
24×243.95 mm6.60 mm12.82 mm15.99 mm
26×264.26 mm7.11 mm13.80 mm17.22 mm
32×325.17 mm8.64 mm16.76 mm20.91 mm
40×406.38 mm10.67 mm20.71 mm25.83 mm
64×6410.03 mm16.76 mm32.54 mm40.59 mm
144×14422.19 mm37.08 mm71.98 mm89.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:

PrinterTarget 0.25 mmTarget 0.40 mmTarget 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):

DataData MatrixQR codeDM : QR in modules
10 bytes16×16 (256)v1, 21×21 (441)0.58
17 bytes18×18 (324)v1, 21×21 (441)0.73
35 bytes24×24 (576)v3, 29×29 (841)0.68
45 bytes32×32 (1024)v3, 29×29 (841)1.22
55 bytes32×32 (1024)v4, 33×33 (1089)0.94
64 bytes36×36 (1296)v4, 33×33 (1089)1.19
100 bytes40×40 (1600)v5, 37×37 (1369)1.17
250 bytes64×64 (4096)v10, 57×57 (3249)1.26
500 bytes88×88 (7744)v15, 77×77 (5929)1.31
1500 bytes144×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.

FAQ

What is a Data Matrix code used for?

Identification where the marking area is tiny or the code must survive on the part itself: electronic components, surgical instruments, automotive and aerospace parts, medical device unit labels. It carries a GS1 identifier plus dates, batch and serial in a grid a linear barcode of the same data would need tens of centimetres for.

How much data can a Data Matrix code hold?

Up to 3,116 digits or 2,335 alphanumeric characters in a 144×144 symbol. A GS1 DataMatrix spends one codeword on the leading FNC1, so 3,114 digits or 2,334 alphanumeric. Plain ASCII text costs one codeword per character, about 1,556 of them at the largest size.

What is the smallest Data Matrix code?

ECC 200 starts at 10×10 modules and holds 6 digits. Including the one-module quiet zone that is 12 modules across, so at a 0.254 mm module it prints 3.05 mm wide. Tables you see quoting 2×2 grids describe obsolete ECC 000 to ECC 140 variants with no error correction.

Is Data Matrix better than a QR code?

For small or etched marks, yes: at 10 to 35 bytes it prints 27 to 42 percent fewer modules than a QR code holding the same data. For URLs, contacts and anything a customer scans with a phone, no — QR has native camera support and up to 2,953 bytes.

Can a phone scan a Data Matrix code?

Many camera apps decode it, but support is inconsistent across devices and apps, and there is no universal on-device prompt the way QR has. Design consumer-facing scans around QR and keep Data Matrix for machines you control.

What does ECC 200 mean?

It names the Data Matrix variant with Reed-Solomon error correction. The earlier ECC 000, 050, 080, 100 and 140 variants have weaker or no correction and are effectively dead. GS1 and every current application standard specify ECC 200 with a leading FNC1 codeword.

How many Application Identifiers fit in one symbol?

As many as the codeword budget allows. A GTIN costs 16 characters, a best-before or expiry date 8, a batch number 2 plus up to 20 characters, a serial number 2 plus up to 20. The symbol size steps up in fixed increments, so one extra field can move you from 24×24 to 26×26.

Does a Data Matrix code need a quiet zone?

Yes, one module wide on all four sides, and nothing may be printed inside it. That is a quarter of QR's four-module margin, which is one of the two reasons the symbol is so much smaller at the same payload; the other is the L-shaped finder pattern instead of three corner squares. Generate the QR side of a label with the QR code generator, print 1D symbologies with the barcode generator, and lay both out with the label maker. For the symbology decision on a printed label see QR code vs barcode labels, and for the family tree of 2D symbols see barcode symbologies.

Keep reading

Contact us