Skip to main content

Data Matrix Generator

Generate a Data Matrix 2D barcode from text, a serial number, or any short string — square or rectangular symbol shape, configurable module size, output as a scalable SVG. Runs entirely in your browser.

Input

Output

SVG source
 
Data Matrix

Your Data Matrix code will appear here.

Was this helpful?

Guides

Turn text, a serial number, a product ID, or any short string into a Data Matrix — a dense 2D barcode common on small parts, PCBs, medical devices, and shipping labels because it stays readable at a very small physical size. Choose a square or rectangular symbol shape and a module size, then copy the SVG or use the preview image directly. Everything runs locally in your browser.

How to use it

  1. Type or paste the data you want to encode — a serial number, product ID, URL, or any short text.
  2. Choose a shape: square (the common choice) or rectangular, useful when the available label space is wide and short.
  3. Adjust module size to scale the barcode up or down.
  4. Copy the SVG source, or download it directly from the preview.

About Data Matrix codes

A Data Matrix encodes data in a grid of square modules bordered by a solid "L" pattern (the finder) on two adjacent sides, with alternating dark/light modules on the other two — that's what lets a scanner determine the symbol's orientation and size from any angle. Like QR and Aztec, it includes Reed–Solomon error correction, so a partially damaged or dirty label can still be read. It's the standard 2D barcode in electronics manufacturing and medical device marking (UDI), where physical space for a label is extremely limited.

Square or rectangular — which should I pick?

Square is the standard choice and reads reliably at the smallest sizes. Rectangular symbols trade some of that space efficiency for a wider, shorter footprint — useful when you're labeling something like a cable or a narrow strip where a square symbol wouldn't fit.

Is my data uploaded anywhere?

No. Barcode generation runs entirely in your browser (or, for API calls, isomorphically in the request handler) — nothing is sent to a third-party service.

Need a different barcode format?

Use the Aztec Code Generator for Aztec Codes, or the QR Code Generator for QR codes.

data matrixbarcode2d barcodegenerator

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.