What Is a Data Matrix Code?

- A Data Matrix stores an identifier in a grid of square modules read by camera-based imagers; it is the standard symbology of direct part marking, DoD IUID, and healthcare UDI.
- Symbol size sets capacity — a 10 × 10 symbol holds 6 digits, a 144 × 144 holds 3,116 — and a typical 20 – 40-character part identifier fits in a symbol about 6 mm across.
- Data Matrix is free to use: no per-symbol fee and no symbology license — the costs are in marking, reading, and verification equipment.
- Acceptance is a measured grade: ISO/IEC 15415 for printed symbols, ISO/IEC 29158 for direct part marks, with contractual minimums such as grade B for MIL-STD-130.
A Data Matrix code is a two-dimensional barcode that stores data in a grid of dark and light square modules, framed by an L-shaped finder pattern on two sides. It is standardized as ISO/IEC 16022, carries built-in Reed – Solomon error correction, and decodes reliably at small physical sizes with a quiet zone of only one module — which is why it became the default code for marking parts, instruments, electronics, and medical devices. This guide covers how the symbol is constructed, every size and its capacity, the GS1 variant used in regulated supply chains, the standards that mandate it, and how marks are applied, read, and verified in production.
Anatomy of a Data Matrix Symbol

Every Data Matrix symbol is built from four elements, and each exists for a reason:
- Finder pattern — two solid dark edges forming an “L”. The reader uses it to locate the symbol and determine its orientation, which is why a Data Matrix reads in any rotation.
- Timing pattern — the two opposite edges alternate dark and light, one module each. Counting these transitions tells the decoder how many rows and columns the grid holds, so the symbol itself declares its own size.
- Data region — the interior grid, where each module encodes one bit. Data and error-correction codewords fill the region; in symbols of 32 × 32 and larger the region is divided into blocks separated by internal alignment patterns, which limits the distortion any single block can accumulate.
- Quiet zone — a clear margin of just one module on all sides. QR requires four; this one-module margin is part of why Data Matrix fits where other symbols do not.
Sizes and Capacity
ECC 200 defines 24 square formats from 10 × 10 to 144 × 144 modules and six rectangular formats for narrow spaces. Capacity depends on the format and on what is encoded — digits pack tighter than letters. The physical footprint is the module count multiplied by the cell size the marking process can produce; the sizes below are shown at a 0.25 mm cell, a common fine-print value.
| Symbol size (modules) | Max numeric | Max alphanumeric | Printed size at a 0.25 mm module (mm) |
|---|---|---|---|
| 10 × 10 | 6 | 3 | 2.5 × 2.5 |
| 12 × 12 | 10 | 6 | 3.0 × 3.0 |
| 14 × 14 | 16 | 10 | 3.5 × 3.5 |
| 16 × 16 | 24 | 16 | 4.0 × 4.0 |
| 18 × 18 | 36 | 25 | 4.5 × 4.5 |
| 20 × 20 | 44 | 31 | 5.0 × 5.0 |
| 22 × 22 | 60 | 43 | 5.5 × 5.5 |
| 24 × 24 | 72 | 52 | 6.0 × 6.0 |
| 26 × 26 | 88 | 64 | 6.5 × 6.5 |
| 32 × 32 | 124 | 91 | 8.0 × 8.0 |
| 36 × 36 | 172 | 127 | 9.0 × 9.0 |
| 40 × 40 | 228 | 169 | 10.0 × 10.0 |
| 44 × 44 | 288 | 214 | 11.0 × 11.0 |
| 48 × 48 | 348 | 259 | 12.0 × 12.0 |
| 52 × 52 | 408 | 304 | 13.0 × 13.0 |
| 64 × 64 | 560 | 418 | 16.0 × 16.0 |
| 72 × 72 | 736 | 550 | 18.0 × 18.0 |
| 80 × 80 | 912 | 682 | 20.0 × 20.0 |
| 88 × 88 | 1,152 | 862 | 22.0 × 22.0 |
| 96 × 96 | 1,392 | 1,042 | 24.0 × 24.0 |
| 104 × 104 | 1,632 | 1,222 | 26.0 × 26.0 |
| 120 × 120 | 2,100 | 1,573 | 30.0 × 30.0 |
| 132 × 132 | 2,608 | 1,954 | 33.0 × 33.0 |
| 144 × 144 | 3,116 | 2,335 | 36.0 × 36.0 |
| Rectangular formats | |||
| 8 × 18 | 10 | 6 | 2.0 × 4.5 |
| 8 × 32 | 20 | 13 | 2.0 × 8.0 |
| 12 × 26 | 32 | 22 | 3.0 × 6.5 |
| 12 × 36 | 44 | 31 | 3.0 × 9.0 |
| 16 × 36 | 64 | 46 | 4.0 × 9.0 |
| 16 × 48 | 98 | 72 | 4.0 × 12.0 |
Reading the table in practice: a typical part identifier of 20 – 40 alphanumeric characters lands between a 22 × 22 symbol (43 characters) and a 26 × 26 symbol (64 characters) — 5.5 to 6.5 mm across at a 0.25 mm cell, and roughly twice that at the coarser cells direct part marking often requires. The headline 3,116-digit maximum belongs to a 144 × 144 symbol no part-marking application prints. Narrower still: the rectangular formats exist for parts where height is the constraint — a 8 × 32 symbol is 2 mm tall. Formats beyond 16 × 48 are defined by the DMRE extension (ISO/IEC 21471), covered in our guide to 2D barcode types.
Error Correction: ECC 200
ECC 200, the only variant in current use, protects the data with Reed – Solomon error correction: alongside the data codewords, the symbol carries error-correction codewords computed from them, and the decoder uses these to reconstruct data lost to damaged or obscured modules. The share of the symbol devoted to error correction is fixed by the format — roughly a quarter to a third of the codewords, with the exact rate varying by symbol size (Keyence technical guide). The name distinguishes it from the obsolete ECC 000 – 140 family, which used an older convolutional error-correction mechanism and is no longer in use (GS1 DataMatrix Guideline); new applications are ECC 200 without exception, and it is the variant all current standards reference.
A Short History
The symbology was developed in the late 1980s by Dennis Priddy and Robert Cymbalski of International Data Matrix, Inc.; the founding patent family dates to 1988 (U.S. Patent 5,473,151 family). NASA’s part-marking programs gave it its industrial career: the direct part marking studies that followed the Challenger accident selected Data Matrix for marking aerospace parts, and NASA’s part-marking standards became the basis for much of the part identification practice that followed (NASA technical report). From there the familiar path: an AIM specification, then ISO/IEC 16022 — the edition in force today was published in 2024 — and adoption into MIL-STD-130, healthcare UDI, and electronics serialization.
Data Matrix vs QR Code
The two symbologies are cousins with different jobs. QR uses three corner finder patterns, needs a four-module quiet zone, and offers selectable error-correction levels; Data Matrix uses the L-shaped finder, needs one module of quiet zone, and fixes error correction by symbol size. For the same short identifier, Data Matrix produces the smaller symbol — which is why it took the industrial marking role while QR took payments, marketing, and packaging. A full comparison — structure, capacity, scanning, and where each belongs — is the subject of an upcoming article on this blog.
GS1 Data Matrix
A plain Data Matrix can carry any data in any format. GS1 Data Matrix is the same ECC 200 symbol carrying data structured to GS1 rules: the encoded data begins with the FNC1 character in the first position, which declares the content as GS1-formatted, and the data itself is organized into Application Identifiers — AI (01) for the GTIN, (10) for batch or lot, (17) for expiry date, (21) for serial number (GS1 Canada fact sheet). A reader reports the two differently through the symbology identifier — a short prefix the reader itself adds in front of the transmitted data (defined in ISO/IEC 15424), not a part of the symbol: ]d1 for plain Data Matrix, ]d2 for GS1 Data Matrix — so software can tell them apart even though the symbols look identical. This is the form regulated supply chains use: healthcare UDI labeling and pharmaceutical serialization encode to GS1 Data Matrix, not to plain Data Matrix, and the distinction matters when a specification names one or the other.
Standards and Mandates
Data Matrix is anchored in industry by the application standards that specify it:
| Standard | Domain | What it specifies |
|---|---|---|
| MIL-STD-130 | US DoD item identification (IUID) | Data Matrix ECC 200 for the machine-readable UII mark, with minimum verification grades |
| SAE AS9132 | Aerospace direct part marking | Quality requirements for Data Matrix part marks; accepted by MIL-STD-130 as pass/fail criteria |
| ATA Spec 2000 | Airline/aerospace parts logistics | Data Matrix for part marking and labels in civil aviation supply chains |
| AIAG B-17 | Automotive direct part marking | Guidelines for applying and verifying Data Matrix DPM in automotive manufacturing |
| FDA UDI rule / GS1 standards | Medical devices | GS1 Data Matrix as a carrier of the Unique Device Identifier |
| NASA-STD-6002 / HDBK-6003 | Aerospace parts (historical basis) | The NASA part-marking standards whose practice later standards built on |
How Data Matrix Codes Are Made, Marked, and Read
Data Matrix is free to use, and generating a symbol takes no special tooling: any barcode library, label software, or the software bundled with a marking system produces a compliant symbol, automatically choosing the smallest format that fits the data. The decisions that matter come after generation — the cell size the marking process can produce, and the verification of the result.
On labels and packaging, Data Matrix is printed — thermal transfer, inkjet, laser coding. On parts, it is applied by direct part marking: fiber-laser marking, dot peen, and electrochemical etching are the standard methods, and the achievable cell size depends on the method and the surface; coatings applied after marking push the required cell size up, which is covered process by process in our guide to durable unique identifiers. Reading is done by camera-based imagers — fixed-mount readers on production lines, handheld imagers in logistics. Phones decode Data Matrix in dedicated scanning apps — the barcode frameworks on iOS and Android support the symbology — but the built-in camera apps target QR codes, so reading a Data Matrix generally takes a scanning app; low-contrast direct part marks are a job for industrial readers.
How a Data Matrix Is Graded
Whether a mark is acceptable is not decided by whether some scanner reads it; it is measured by a calibrated verifier and reported as a grade from A (4.0) to F (0.0), together with the measurement conditions — aperture and wavelength, for example 3.0/05/650. Application standards set the pass line: MIL-STD-130 requires B (3.0/05/650) under ISO/IEC 15415 or 2.0 under the DPM methodology, and GS1 healthcare specifications require C (1.5) in final configuration.
A printed Data Matrix is graded under ISO/IEC 15415. The verifier decodes the symbol, then grades each parameter; the final grade is the lowest individual parameter grade — one weak parameter caps the whole symbol:
- Symbol contrast — the difference between the darkest and lightest modules.
- Modulation — local contrast: whether each individual module is reliably distinguishable from the threshold, not just the symbol on average.
- Fixed pattern damage — damage to the structures the decoder navigates by: the L-shaped finder, the timing pattern, and the quiet zone.
- Axial and grid nonuniformity — the symbol stretched along one axis, and individual cells displaced from their ideal grid positions.
- Unused error correction — how much Reed – Solomon headroom was left after decoding; a symbol that decoded only by consuming its error correction is already near failure.
A Data Matrix applied by direct part marking is graded under ISO/IEC 29158, the ISO successor of the AIM DPM-1-2006 guideline, which adapts the same framework to marks made in metal (Cognex verification reference): symbol contrast becomes cell contrast — computed from the mean reflectance of light and dark cells rather than the extremes — and modulation becomes cell modulation, with the threshold derived statistically; a minimum reflectance floor of 5% is added to catch extremely low-contrast marks; and dome, low-angle and mid-angle lighting geometries are permitted alongside perpendicular light. The verifier also varies the measurement aperture until the symbol decodes, then repeats the grading at 50% and 80% apertures. Grades come out systematically higher under the DPM methodology than under ISO/IEC 15415 on the same mark, which is why it applies only where the application standard calls for it. How these grades compare across symbologies is in our 2D barcode types guide.
Where Data Matrix Reaches Its Limits
A Data Matrix is decoded cell by cell: every module must still be classifiable as dark or light, and the grading parameters — contrast, modulation, cell damage — measure exactly that. The specification defines how the symbol is printed, read, and verified; like every cell-based symbology, it does not define behavior through manufacturing steps that transform the surface after marking. Heat treatment, shot blasting, and coating lines degrade the measured parameters themselves, so a mark that verified at B on the marking station can fall below its minimum grade by the time the part is identified.
That boundary is where CDOT Code operates. CDOT is built on a harmonic dot structure: the identifier is encoded in the frequency domain (U.S. Patent No. 12,242,922) and decoded from the mark’s signal as a whole rather than cell by cell, so readability is not governed by cell-quality parameters. It is applied with the marking hardware plants already run — laser engraving and dot peen — and read with standard industrial readers and mobile devices; readability has been validated through heat treatment up to 860 °C (1,580 °F), shot blasting, KTL (cataphoretic) coating, multi-layer painting, phosphating, zinc and nickel plating, and hot-dip galvanization, with up to 90% physical surface loss (Cosmodot customer case studies). In footprint terms: 3 mm² of CDOT carries up to 520 alphanumeric characters. In Data Matrix terms, 520 characters need a 72 × 72 symbol — 36 × 36 mm, about 1,300 mm², at a 0.5 mm cell — while the Data Matrix that fits into 3 mm² is a 12 × 12 symbol at ≈ 0.15 mm cells, with a capacity of six alphanumeric characters (Cosmodot). For parts that go through further manufacturing steps after marking, the selection logic is in our durable unique identifier guide.

Frequently Asked Questions
- How many characters fit in a Data Matrix code?
- Up to 3,116 numeric or 2,335 alphanumeric characters in the largest 144 × 144 format. Practical symbols are smaller: a 30-character part identifier fits in a 24 × 24 symbol, which is 6 × 6 mm at a 0.25 mm cell.
- What is the smallest Data Matrix code?
- The 10 × 10 format, which holds 6 digits or 3 alphanumeric characters — 2.5 × 2.5 mm at a 0.25 mm cell. The smallest practical symbol for a given application is set by the number of characters to encode and by the cell size the marking process can produce.
- Can a phone camera read a Data Matrix code?
- In a scanning app, generally yes — the barcode frameworks on iOS and Android support Data Matrix. The built-in camera apps target QR codes, so a dedicated scanning app is normally needed, and low-contrast direct part marks on metal are a job for industrial imagers.
- What is the difference between Data Matrix and GS1 Data Matrix?
- The symbol is the same ECC 200 Data Matrix; the difference is the data. GS1 Data Matrix starts with the FNC1 character and structures its content as GS1 Application Identifiers (GTIN, lot, expiry, serial), and readers report it with the symbology identifier ]d2 instead of ]d1. Regulated applications such as healthcare UDI specify GS1 Data Matrix.
- Is Data Matrix free to use?
- Yes. There is no per-symbol fee and no symbology license: the founding patents have expired, and compliant symbols are generated by open-source libraries and by the software bundled with marking systems and printers. What manufacturers pay for is the infrastructure around the symbol — marking equipment, readers, and verification — and, when encoding GS1 identifiers such as a GTIN, the GS1 company prefix membership.
- What quality grade does a Data Matrix mark need?
- Whatever the applicable standard sets: MIL-STD-130 requires a minimum of B (3.0/05/650) under ISO/IEC 15415 or 2.0 under the AIM DPM / ISO/IEC 29158 methodology; GS1 healthcare specifications require C (1.5) in final packaging configuration. The grade is measured with a calibrated verifier, not judged by a scanner reading the code.
Prove CDOT on Your Parts
Validate CDOT under your own production conditions — your marking hardware, your parts, your processes, and your industrial readers.
Start a Technical Validation › Prefer email? Reach us at info@thecosmodot.comReferences
- Keyence — What is a DataMatrix code? (structure, sizes, error correction): keyence.com
- Cognex — ISO/IEC TR 29158 (AIM DPM) verification reference: cognex.com
- GS1 — GS1 DataMatrix Guideline (FNC1, quiet zone, ECC history): ref.gs1.org
- GS1 Canada — GS1 DataMatrix Fact Sheet (FNC1, AIs, symbology identifiers): gs1ca.org
- U.S. Patent 5,473,151 (Priddy & Cymbalski, International Data Matrix; status: expired): patents.google.com
- NASA Technical Reports Server — direct part marking of Data Matrix on aerospace parts: ntrs.nasa.gov
- DoD Instruction 8320.04: esd.whs.mil
- U.S. Patent 12,242,922: patents.google.com
- Cosmodot — What Is a Durable Unique Identifier? A Manufacturing Guide: thecosmodot.com
- Cosmodot — 2D Barcode Types: A Manufacturing Selection Guide: thecosmodot.com
- Cosmodot — CDOT Code: thecosmodot.com/cdot