Skip to main content
Online Tool

Data Matrix Generator

Encode text, UDI or GS1 payloads as a Data Matrix barcode. Download as PNG or SVG — fully client-side. Choose Auto or one of 30 square and rectangular symbol sizes, switch on GS1 mode for Application Identifiers, and set the encoding, module size and quiet zone.

Up to 2335 alphanumeric characters. For GS1, use parenthesised AIs.

Adds FNC1 prefix and parses AIs.

Encoded payload
(01)09506000134352(17)261231(10)ABC123

Files are generated on your device — nothing is uploaded.

About the Data Matrix generator

The ReadBarcode Data Matrix generator encodes text, UDI or GS1 payloads as a Data Matrix 2D barcode and renders both PNG and SVG output — all locally with the open-source bwip-js library.

Data Matrix is the dominant 2D format outside consumer QR: medical device UDI under FDA / EU MDR, pharma serialisation (PPN / GS1 DataMatrix), electronics, aerospace direct-part marking, and the GS1 Sunrise 2027 retail rollout all rely on it. Toggle GS1 mode to insert the required FNC1 prefix so scanners parse the payload as structured Application Identifiers.

When to Use It

  • Marking medical devices for FDA UDI or EU MDR.
  • Pharma serialisation (GS1 DataMatrix with GTIN + lot + expiry + serial).
  • Direct-part marking on metal, PCBs, or small electronics.
  • Aerospace, automotive, and defence part traceability.
  • Fresh-food variable-weight labelling alongside GS1 Digital Link.
  • Embedding URLs or short payloads where Data Matrix is mandated.

How It Works

  1. Enter your data Type or paste up to 2335 alphanumeric characters.
  2. Choose GS1 mode Enable for structured GS1 payloads with FNC1.
  3. Pick a size Auto fits your data; force a size only when label artwork requires it.
  4. Tune scale & quiet zone Bigger module size scans further; bigger quiet zone helps imperfect printers.
  5. Download PNG or SVG SVG for print and labels; PNG for screen proofs.

What to Avoid

  • Putting parenthesised AIs in non-GS1 mode — scanners won't strip the brackets.
  • Forcing a tiny symbol size that can't hold your data — switch back to Auto.
  • Setting module size too small for the target printer's DPI — the modules blur together.
  • Skipping the quiet zone — most scanners need at least 1 module of clearance.
  • Encoding sensitive data in plain text — anyone with a phone can decode it.

Tips & Tricks

  • Use rectangular sizes (e.g. 16x48) for narrow labels like cable flags.
  • For metal direct-part marking, scale modules up; dot-peen scanners need larger cells.
  • Round-trip-test your output with the Data Matrix Reader on this site.
  • GS1 DataMatrix payloads should match the receiver's master data exactly.
  • Keep payloads short — every extra character adds modules and shrinks scan margin.

Private by Default

Data Matrix codes are rendered locally with bwip-js. The payload you enter never touches our servers.

GS1 Data Matrix Generator for UDI and Pharma

With GS1 mode on, this is a GS1 Data Matrix generator: the symbol starts with FNC1 and your bracketed Application Identifiers become GS1 element strings, the form used on GS1 healthcare labels.

UDI Data Matrix Codes

A UDI pairs a device identifier with production identifiers. With GS1 as the issuing agency, the device identifier is the GTIN in AI (01), followed by AIs such as (17) expiry, (10) lot and (21) serial number. Decode the result with the Data Matrix reader to confirm each element.

2D Data Matrix Generator vs QR Code

Data Matrix usually fits the same data into a smaller symbol with a narrower margin, while QR is the code consumers scan with phones.

FeatureData Matrix (ECC 200)QR Code
Finder patternL-shaped border on two sidesThree corner squares
Quiet zone1 module4 modules
Error correctionFixed by symbol sizeLevels L, M, Q or H

When space is tight, a 2D matrix generator that outputs Data Matrix is the better pick; the 1D vs 2D barcodes guide covers where either replaces a linear barcode.

Data Matrix Code Generator Settings: Size and ECC 200

This online Data Matrix generator is an ECC200 Data Matrix generator: every code uses ECC 200, the Reed-Solomon version GS1 requires. Error correction comes with the symbol size, so there is no level to pick.

  • Symbol size: Auto, or one of 24 square and 6 rectangular sizes.
  • Encoding: Auto, ASCII, C40, Text or Base 256.
  • Module size and quiet zone: keep the margin at least one module wide.

Frequently Asked Questions

What is a Data Matrix code?

Data Matrix is a 2D barcode made of black-and-white modules arranged in a square or rectangle. It packs a lot of data into a tiny footprint, which is why it dominates healthcare UDI, electronics, and direct-part marking on metal.

When should I use Data Matrix instead of QR?

Pick Data Matrix when you need to mark very small items, etch on metal, or follow industry standards that mandate it (medical devices under FDA UDI / EU MDR, pharma serialisation, aerospace parts). Pick QR for consumer-facing scans where phones are the reader.

What is GS1 Data Matrix mode?

GS1 Data Matrix uses FNC1 as the first character to tell scanners the payload is structured GS1 Application Identifiers (AIs). Enable the GS1 toggle and start your payload with parenthesised AIs, e.g. (01)09506000134352(17)261231(10)ABC123.

What Size Should I Choose?

Auto picks the smallest symbol that fits your data. Force a specific size only if your label artwork demands a fixed footprint. Square sizes range from 10×10 to 144×144; rectangles from 8×18 to 16×48.

Is My Data Uploaded Anywhere?

No. The barcode is rendered locally with the open-source bwip-js library. Nothing leaves your browser.

Is the Data Matrix Generator Free?

Yes. This Data Matrix creator costs nothing, needs no account and adds no watermark, and there is no cap on how many codes you make. The PNG, SVG and print downloads are free as well, because your browser renders them.

How Do I Generate a Data Matrix Code in Excel?

Excel has no built-in Data Matrix function. For a few codes, paste each cell's value into this Data Matrix barcode generator, download the PNG or SVG and place it in the sheet with Insert > Pictures. For hundreds of rows you need a barcode add-in, or a Data Matrix font together with its encoder, because a font alone cannot calculate the error correction codewords.

What Is the Difference Between a Data Matrix Barcode and a QR Code?

A Data Matrix is found by its L-shaped border on two sides, while a QR code is found by three squares in its corners. Data Matrix error correction is fixed for each symbol size and the symbol can be rectangular; a QR code is always square and lets you choose one of four error correction levels. Data Matrix suits small parts and GS1 healthcare labels, and QR suits codes that the public scans with a phone.

Related Tools