How to create a Data Matrix barcode
- Enter your data in the box above. Any text, including lower case, symbols and UTF-8 characters. Up to 3,116 digits or 2,335 alphanumeric characters. The symbol size is chosen automatically.
- The barcode updates live as you type. Open Customize to change the bar height, colors, rotation or quiet zone.
- Click Download PNG for labels and documents, or SVG / PDF for print and packaging design.
- Test it with our online barcode scanner before you print a large run.
What is a Data Matrix barcode?
A Data Matrix code is a two-dimensional barcode made of black and white square cells arranged in a square or rectangle. You can recognise it by the solid L-shaped border on two sides (the finder pattern) and the alternating dotted border on the other two (the timing pattern).
The modern version, ECC 200, uses Reed-Solomon error correction, so a code can still be read when part of it is scratched or smudged. Data Matrix can be printed or laser-etched very small, which makes it the standard for marking parts, circuit boards and medical devices. GS1 uses it for healthcare and retail traceability as GS1 DataMatrix.
Where Data Matrix is used
- Electronic components and printed circuit boards
- Direct part marking (laser, dot peen) in aerospace and automotive
- US Department of Defense UID marking (MIL-STD-130)
- Pharmaceutical packs and medical devices (as GS1 DataMatrix)
- Postage indicia and franking marks
- Small labels where a QR code would be too big
Data Matrix specifications
| Type | 2D matrix |
|---|---|
| Characters | Full ASCII and extended byte data (UTF-8 supported) |
| Capacity (max) | 3,116 digits, 2,335 alphanumeric characters or 1,556 bytes |
| Square sizes | 10 × 10 to 144 × 144 modules (24 sizes) |
| Rectangular sizes | 8 × 18 to 16 × 48 modules (6 sizes) |
| Error correction | Reed-Solomon (ECC 200), fixed by symbol size |
| Quiet zone | At least 1 module on all sides |
| Standard | ISO/IEC 16022 |
Tips for a barcode that scans first time
- Short data gives larger cells at the same printed size, which scans more easily.
- Keep each cell at least about 0.25 mm for printed labels, and bigger for rough surfaces or low-resolution printers.
- Print dark on light where you can. Many scanners can read inverted (light on dark) Data Matrix, but not all.
- For GTINs, batch numbers and expiry dates on products use GS1 DataMatrix, which adds the required FNC1 and Application Identifiers.
Frequently asked questions
How much data can a Data Matrix hold?
Up to 3,116 digits, 2,335 alphanumeric characters or 1,556 bytes in the largest 144 × 144 symbol. Most real uses store far less, such as a serial number of 10 to 30 characters, which fits in a code a few millimetres across.
What is the difference between Data Matrix and a QR code?
Both are 2D codes. Data Matrix has an L-shaped border and is more compact for small amounts of data, so it is preferred for tiny marks on parts and packaging. A QR code has three corner squares and is better for consumer use, since every phone camera reads it.
Can phones scan Data Matrix codes?
Many can, through barcode scanning apps and some built-in camera features. Support is less universal than for QR codes. You can test any code with our online barcode scanner.
What is ECC 200?
ECC 200 is the current version of Data Matrix, with Reed-Solomon error correction. Older versions (ECC 000 to 140) are obsolete. All Data Matrix codes made here are ECC 200.
What is the difference between Data Matrix and GS1 DataMatrix?
GS1 DataMatrix is a Data Matrix that starts with a special FNC1 character and holds GS1 Application Identifiers, such as (01) GTIN, (17) expiry and (10) batch. Use it on regulated products. Use plain Data Matrix for your own internal data.
How small can a Data Matrix be printed?
The smallest symbol is 10 × 10 modules. With cells of about 0.25 mm that is around 3 mm square including the quiet zone. Reliable size depends on your printer and scanner, so test before a large run.