Decode one
Scan or paste a barcode and see every part of it.
Make one
Generate a valid barcode from fields.
Where you’ll see it
- Medicine packs and medical devices, as GS1 DataMatrix carrying a GTIN, expiry date, batch and serial number.
- Electronic components and machined parts, often marked straight onto the part by laser or dot peen.
- Postage, on some postal services’ printed stamps and labels.
- Products, alongside or in place of a UPC or EAN, as retailers adopt 2D barcodes. See Sunrise 2027.
Anatomy
This example is a GS1 DataMatrix carrying a GTIN, an expiry date and a batch.The finder pattern and clock track
Two solid edges form an L, which tells a scanner where the code is and which way up it is. The other two edges alternate dark and light, setting out the grid of modules. In larger sizes the code is split into regions, each with its own L and clock track, so you’ll see lines through the middle.Sizes
Square sizes run from 10×10 to 144×144 modules, and rectangular sizes from 8×18 to 16×48. An encoder picks the smallest size that fits the data. The largest square holds up to 3,116 digits or 2,335 letters and digits.Quiet zone
Data Matrix needs a light margin at least 1 module wide on every side. More is safer.Error correction
Data Matrix uses Reed–Solomon error correction, and the amount is fixed by the size: you don’t choose a level. Small codes spend about as many codewords on error correction as on data, so they’re very robust for their size. To make a Data Matrix tougher, print it with larger modules and keep its quiet zone clear. See How much error correction should I use?Variants and related types
- GS1 DataMatrix: a Data Matrix that starts with the GS1 special character FNC1 and carries GS1 element strings. It’s what’s on medicine packs. Some scanners report it with
]d2in front of the data. - ECC 000 to ECC 140: older forms of Data Matrix that are obsolete. Everything current is ECC 200, shown here.
- QR Code: larger for the same data, but more familiar to phone users.
- GS1-128: the same GS1 data in a linear barcode.
Gotchas
- Fields run together. As with GS1-128, the parentheses in the printed text aren’t in the data. See parentheses missing from the scan.
- Separators in the data. A variable-length field followed by another field ends with the GS character. See invisible characters.
- Marks on metal and plastic. Codes marked straight onto parts can be low contrast or shiny, which phone cameras find much harder than print.
Scanning it in your app
Specification
- ISO/IEC 16022: the Data Matrix barcode specification.
- GS1 General Specifications: GS1 DataMatrix.