Barcodes Data Matrix Round-trip verified Runs in your browser

Data Matrix Generator

Create Data Matrix codes for part marking and small labels.

Your data is processed locally in your browser and is not uploaded to our servers.

What a Data Matrix code is

Data Matrix is a two-dimensional symbology defined by ISO/IEC 16022. Data is stored in a square or rectangular grid of black and white modules, wrapped in an L-shaped solid border on two sides and an alternating "clock track" on the other two. Those patterns are how a scanner finds the symbol and works out its size and orientation, which is why a Data Matrix reads at any rotation.

Its distinguishing feature is density. A Data Matrix carrying a serial number can be a couple of millimetres across and still read reliably, which is why it dominates direct part marking — etched onto surgical instruments, circuit boards, engine components and aerospace parts where there is no room for anything larger.

How to create one

Type or paste the data you want to encode. The symbol appears as you type, along with its module count and the options actually applied.

  1. Enter the content — a part number, serial, URL or any text.
  2. Pick a shape if you need one. Auto chooses the smallest symbol that fits; rectangular suits narrow labels such as cable flags.
  3. Set the module size and quiet zone. One module of clear space on every side is the ISO minimum.
  4. Download SVG for print, or PNG for screens and existing artwork.

Error correction is not an option here

Every Data Matrix uses ECC 200 Reed–Solomon error correction. Unlike a QR code, there are no L/M/Q/H levels to choose between — the correction level is fixed by the standard and scales with the symbol size. A damaged or partly obscured symbol can still be recovered up to roughly a quarter of its area, but that is a property of the symbology, not a setting you can trade away for a smaller code.

What you can control is everything around the encoding: contrast, module size, quiet zone and print quality. Those are where real-world failures come from.

Where Data Matrix is used

Manufacturing and part marking. Laser-etched or dot-peened directly onto metal and plastic, often only 2–3 mm square.

Healthcare. Unit-of-use medicine packaging and instrument tracking, usually as GS1 DataMatrix so the data carries Application Identifiers — use the GS1 DataMatrix generator for that.

Electronics. Component reels, PCBs and test fixtures, where the symbol has to survive reflow and handling.

Postal and logistics. Several national postal services use Data Matrix for sorting marks.

Printing and marking

Data Matrix tolerates small sizes, but only if the module edges stay clean. Two rules matter more than anything else:

  • Contrast. Dark modules on a light background. Inverted symbols exist in the standard but many scanners will not attempt them, so keep the default polarity unless your reader is known to handle inversion.
  • Module size. The printer or marking process must be able to resolve a single module cleanly. A symbol that looks fine on screen at 8 px per module can turn to mud at 200 DPI on absorbent card.

Download the SVG for anything that will be printed. It is a real vector file, so the module grid stays exact at any size instead of being resampled. Our printing guide covers contrast, quiet zones and materials in more detail — the same physics applies here.

Privacy and security

The data you type is encoded in your browser. It is not sent to our servers, not written to storage, and not included in analytics. The generated image is built on your device and downloaded directly from it. Close the tab and nothing remains.

Limitations

A Data Matrix made here is static: the content lives in the pattern, so it cannot be changed or redirected after printing.

Capacity has a practical ceiling well below the theoretical one. The standard allows up to 2,335 alphanumeric characters, but a symbol that large has 144×144 modules and needs a big, well-printed label to be readable. For long payloads, consider whether a short URL pointing to your own page would serve better.

This tool encodes text as UTF-8 bytes. It does not implement the ECI protocol for declaring other character sets, structured append for splitting data across several symbols, or reader-programming symbols.

Frequently asked questions

Is Data Matrix better than a QR code?

For small marks, usually yes — a Data Matrix holding the same short payload is meaningfully smaller. For anything scanned by the public with a phone, a QR code is the better choice because every camera app recognises it without extra software.

Can I choose the error correction level?

No, and neither can anyone else. ECC 200 is fixed by ISO/IEC 16022 and scales automatically with the symbol size.

What is the smallest Data Matrix I can print?

The smallest square symbol is 10×10 modules, which holds 3 numeric characters. Physical size depends entirely on what your printer or marking process can resolve cleanly — test a sample before committing.

Why is my symbol rectangular when I did not ask for that?

On Auto the encoder picks whichever shape gives the smallest symbol for your data. Choose Square explicitly if your process needs it.

Will a phone scan a Data Matrix?

Modern iPhone and Android cameras generally do, and this page offers a Verify step where your browser supports it. A dedicated imager is still more reliable for small marks on metal.

Does generating a symbol register anything?

No. This draws an image from data you supply. It does not allocate part numbers, GTINs or any other identifier.

Curious how we build and check these codes? Read our methodology.