Data Matrix generator
A 2D code that stays readable at a few millimetres square and survives partial damage. The standard for marking small components, electronics and medical devices.
EAN-13 — enter 12 digits and the check digit is calculated for you, or paste all 13.
Loading barcode engine…
Free, unlimited, no account required. Nothing you type is sent to our servers — the barcode is drawn in your browser.
Why Data Matrix rather than a QR code
They look similar and both are 2D, but they were designed for different jobs.
| Data Matrix | QR code | |
|---|---|---|
| Smallest practical size | Around 2–3 mm square | Around 10 mm square |
| Quiet zone needed | 1 module | 4 modules |
| Designed for | Industrial part marking | Consumer phone scanning |
| Phone camera support | Needs a dedicated app | Native in every phone camera |
| Error correction | ECC200 (Reed–Solomon), ~30% | Selectable L/M/Q/H |
The rule of thumb: if a person with a phone is meant to scan it, use a QR code. If a machine with a fixed scanner is meant to read it off a component, use Data Matrix.
Where it gets used
- Electronics — PCB and component marking, where there is only millimetres of space.
- Medical devices — UDI marking under FDA and EU MDR rules, usually as GS1 DataMatrix.
- Pharmaceutical — serialisation under FMD and DSCSA, carrying GTIN, batch, expiry and serial.
- Aerospace and defence — direct part marking, laser-etched straight onto metal.
- Automotive — traceability of safety-critical components through the supply chain.
GS1 DataMatrix and application identifiers
A plain Data Matrix carries whatever you put in it. A GS1 DataMatrix follows a structured format where each field is prefixed by an application identifier, so any compliant scanner knows what it is reading.
| AI | Field | Example |
|---|---|---|
| (01) | GTIN | 05901234123457 |
| (10) | Batch / lot | ABC123 |
| (17) | Expiry date (YYMMDD) | 271231 |
| (21) | Serial number | 000000001 |
The generator above produces standard Data Matrix symbols. For structured GS1 encoding with application identifiers, and for GS1 Digital Link, use the GS1 type in the dashboard — see GS1 Digital Link.
Marking small parts reliably
- Data Matrix needs only a 1-module quiet zone, which is why it fits where nothing else will — but it still needs that margin.
- ECC200 recovers from roughly 30% damage, so a scuffed or partially obscured mark usually still reads.
- For direct part marking — laser etch or dot peen — contrast comes from surface texture rather than ink, so verify with the actual reader on the actual material.
- Download SVG for anything etched or printed at small size; module edges matter more the smaller you go.
Frequently Asked Questions
What is the difference between Data Matrix and QR?
Data Matrix is built for industrial marking — it reads at 2–3mm, needs only a one-module quiet zone, and is scanned by fixed industrial readers. QR is built for phones: bigger, but natively readable by any phone camera. Use Data Matrix on parts, QR for people.
What is ECC200?
The modern error-correction scheme for Data Matrix, using Reed–Solomon coding to recover from roughly 30% damage. Every code generated here is ECC200; older schemes are obsolete.
Can a phone scan a Data Matrix?
Not with the native camera on most phones. It needs a dedicated scanning app. This is why Data Matrix is a poor choice for anything consumer-facing — use a QR code there instead.
What is GS1 DataMatrix?
A Data Matrix carrying GS1-structured data, where fields such as GTIN, batch, expiry and serial are each prefixed by an application identifier. It is required for medical device UDI and pharmaceutical serialisation.
How small can I print one?
Around 2–3mm square is realistic with good print quality and a suitable reader. The limiting factor is the module size your printing or marking process can hold, not the symbology.
Marking products customers will scan?
Data Matrix is for machines. If a person with a phone is scanning it, you want a dynamic QR code — trackable, and repointable after the packaging is printed.
7-day free trial, no credit card. Data Matrix stays free forever.