Barcode Page

Data Matrix Generator

Generate a Data Matrix 2D code from any text and download it as PNG. Built for part numbers, serials and GS1 labels that are too small for a 1D barcode.

—
Ready

Type a part number, a serial or a short GS1 string and get a 2D Data Matrix code you can print on a small label. It runs in your browser, so nothing you enter is uploaded.

When a Data Matrix beats a barcode

A Data Matrix is a square grid of black and white cells rather than a row of bars. That shape is the whole advantage: it packs the same information into a fraction of the area, and it can be printed as small as a few millimetres and still read.

That is why it is on everything you cannot fit a normal label onto — electronic components, printed circuit boards, car parts, surgical instruments, pharmaceutical vials, aircraft components. If the label has to survive a 3 mm square, or be laser-etched onto metal, Data Matrix is usually the answer.

It also tolerates damage. ECC 200 error correction can reconstruct the data when up to about 30% of the symbol is missing or dirty, which matters when the code is going to be handled, washed or dropped.

Data Matrix or QR code?

Both are 2D codes and both hold text. The practical difference:

  • Data Matrix is smaller for the same amount of data, and is the default in manufacturing, electronics, aerospace and healthcare.
  • QR holds more data at larger sizes, is scannable by phone cameras out of the box, and is the right choice when a consumer is going to point a phone at it.

If a warehouse scanner or a machine vision system will read it, Data Matrix. If a customer will read it, QR.

GS1 DataMatrix and healthcare

Pharmaceuticals and medical devices increasingly use GS1 DataMatrix: a Data Matrix carrying GS1 Application Identifiers — a GTIN, a batch number, an expiry date, sometimes a serial. Regulators in the EU and US require it on prescription medicines and on many devices, which is why the format keeps showing up in packaging jobs.

This generator encodes whatever plain text you give it. It does not validate GS1 AI syntax or check a GTIN against a database, so if you need a compliant UDI symbol, verify the data with a purpose-built GS1 tool before you print.

Sizes that actually scan

A Data Matrix symbol is measured by its module count, not its millimetres. A small code might be 10×10 modules, a dense one 144×144. The printable floor depends on the printer: 300 DPI laser can hold roughly a 0.33 mm module, so a 20×20 symbol lands around 7 mm square; a 600 DPI printer gets you down to about 3 mm.

Practical rules that save reprints:

  • Keep the quiet zone — at least one module wide on every side, and 2 mm is safer on labels.
  • Print dark-on-light. Etched or engraved codes need enough contrast for the scanner's light.
  • Test one label with the actual scanner before running the batch. A phone camera is not a machine vision scanner.

If you need a code for a curved surface, shrink the module size only after checking the scanner can still resolve it.

Related

Need a different symbology? The main generator covers nine of them, including Code 128, EAN-13 and ITF-14.

All barcode types