Free Data Matrix Generator

Create tiny, rugged Data Matrix and GS1 Data Matrix 2D codes for small parts, electronics and pharma UDI — right in your browser. Download as PNG, SVG or PDF, free, no signup, no watermark.

Data Matrix & GS1 DM PNG · SVG · PDF No watermark Nothing uploaded

Data Matrix settings

#000000
#FFFFFF

Preview

Need to print Data Matrix codes — or put them on a full label?

The free LabelInn app places your Data Matrix on a real label with part numbers, lot codes and text, then prints directly to Zebra (ZPL) and TSC (TSPL) thermal printers — including bulk printing from Excel.

Get LabelInn — Free →

What is a Data Matrix code?

A Data Matrix is a two-dimensional (2D) barcode made of black and white square modules arranged in a grid, framed by a solid "L" finder pattern on two edges and a dashed timing pattern on the other two. Because it stores data in both dimensions instead of just in bar widths, a Data Matrix packs a surprising amount of information — up to about 2,335 alphanumeric characters — into a very small square. That density is exactly why it dominates where space is scarce: small parts, printed circuit boards, electronic components, surgical instruments, and pharmaceutical and medical-device UDI labels.

The modern version used everywhere today is Data Matrix ECC 200, which adds Reed-Solomon error correction so the code still scans even when part of it is scratched, smudged or partially covered. Enter your data on the left, and download the finished code as a scalable SVG, a high-resolution PNG, or a print-ready PDF. Everything is generated in your browser with the bwip-js engine — nothing you type is ever uploaded.

Why choose Data Matrix over a QR code?

Data Matrix and QR Code are both robust 2D symbologies, but they suit different jobs:

Rule of thumb: reach for Data Matrix for tiny industrial and regulated marking, and reach for a QR code for consumer scanning of URLs and contact data.

Data Matrix vs. GS1 Data Matrix

This tool offers two flavours in the type dropdown:

TypeWhat it isData you enter
Data MatrixA plain ECC 200 symbol carrying any text, number, URL or serialFree-form, e.g. PN-48213-A
GS1 Data MatrixA Data Matrix whose data is structured with GS1 Application Identifiers (GTIN, lot, expiry, serial) — required for pharma and UDI(AI) notation, e.g. (01)09501101020917(17)281231

In GS1 Data Matrix, each (AI) declares what the following digits mean — (01) is the GTIN, (17) is the expiry date (YYMMDD), (10) is the batch/lot, and (21) is the serial number. The generator inserts the invisible FNC1 separators for you when you use the GS1 Data Matrix type, so scanners parse the fields correctly.

How to generate a Data Matrix code

  1. The tool already defaults to Data Matrix. Switch to GS1 Data Matrix in the dropdown if you need GTIN/lot/expiry structure.
  2. Type your data — a part number or serial for plain Data Matrix, or an (AI) string for GS1 Data Matrix.
  3. Adjust size, module color, quiet zone and rotation. Keep the quiet zone clear — Data Matrix needs a clean margin on all sides.
  4. Download as SVG (best for small, crisp printing), PNG or PDF.

Printing Data Matrix codes at small sizes

Data Matrix scales down beautifully, but tiny codes only scan if each module survives printing. A few practical tips:

Print Data Matrix to a label with LabelInn

Downloading a PNG is fine for a one-off, but real work usually means putting the code on a full label alongside a part number, lot and description — and printing hundreds of them. The free LabelInn app is built for exactly that. It renders each label natively and sends it driverless as ZPL to Zebra and TSPL to TSC printers over USB, network (TCP 9100) or Bluetooth, so codes print sharp at the printer's native resolution rather than as a scaled bitmap. You can bind the Data Matrix data to an Excel column and bulk-print a code per row, which is ideal for serialized part marking and GS1/UDI runs. Explore all LabelInn features or build a whole label in the browser with the free label maker.

Embed this Data Matrix generator on your site

Free to embed — just keep the attribution link. Great for supplier portals, engineering intranets and help centers.

<iframe src="https://www.labelinn.com/en/data-matrix-generator?embed=1" width="100%" height="640" style="border:1px solid #e5e7eb;border-radius:12px" title="Free Data Matrix Generator by LabelInn" loading="lazy"></iframe> <p>Free <a href="https://www.labelinn.com/en/data-matrix-generator">Data Matrix generator</a> by LabelInn</p>

Frequently asked questions

Is this Data Matrix generator free?

Yes — no signup, no watermark, no limits. Codes are generated in your browser, so nothing you type is uploaded, and you can download PNG, SVG or PDF.

What is Data Matrix used for?

It is a compact 2D code for small parts, electronic components, direct part marking, and pharma / medical-device UDI — anywhere space is tight and a 1D barcode won't fit.

What's the difference between Data Matrix and GS1 Data Matrix?

GS1 Data Matrix carries the same square symbol but structures its data with GS1 Application Identifiers like (01) GTIN and (17) expiry. Pick the GS1 Data Matrix type and enter data in (AI) notation.

Does Data Matrix have error correction?

Yes. ECC 200 Data Matrix uses fixed Reed-Solomon error correction, so a partly damaged code still scans. Unlike QR Code, the level isn't adjustable — it's built in.

How do I print a Data Matrix to a Zebra or TSC printer?

Download the image and print it, or use the free LabelInn app to place the code on a full label and print directly as ZPL (Zebra) or TSPL (TSC) — including bulk runs from Excel.

Need a different symbology? Generate any of 17+ types — including QR Code — with the full barcode generator, or design a complete label in the free label maker. See all free tools.