Home · Barcode types · Data Matrix

Free Data Matrix Generator: GS1-Ready 2D Barcodes for Pharma DSCSA, FDA UDI & PCBs

Data Matrix is a square (or rectangular) 2D barcode that encodes data in a black-and-white module pattern. It can store anywhere from a few characters up to 2,335 alphanumeric characters in a single small mark — and it remains readable when up to ~30% of the symbol is damaged thanks to built-in Reed-Solomon error correction.

Data Matrix example

Validator

Paste an existing Data Matrix into the field above. We compute the check digit if you provide just the payload, verify it if you provide the full code, and refuse to render if the check digit is wrong — so anything that renders here is guaranteed to scan.

Industrial uses dominate: pharmaceutical drug labels (DSCSA serialization), automotive parts marked directly on metal, electronic component trays, surgical instrument tracking, and any application where you need to encode meaningful data in a space too small for a linear barcode.

Structure

Square sizes from 10×10 modules (3 numeric / 6 alphanumeric chars) up to 144×144 (2,335 alphanumeric / 3,116 numeric). Rectangular sizes available for narrow label strips. Includes a fixed 'L-shape' finder pattern and timing pattern that scanners use to locate and orient the code.

When to use Data Matrix

Where it's required

FAQ

Is Data Matrix the same as a QR code?

Both are 2D matrix barcodes but with different uses. Data Matrix uses an L-shaped finder pattern and is much more compact (scans reliably at 2.5×2.5mm), making it the standard for pharma serialization, FDA UDI, and PCB marking. QR codes use three corner-square finder patterns, are bigger, and are the consumer-facing default for marketing and smartphone scanning. See our full comparison.

What is the difference between GS1 Data Matrix and a QR code?

GS1 Data Matrix is the Data Matrix symbology with mandatory GS1 Application Identifier syntax — an FNC1 character at the start, then (AI)data pairs. Example pharma encoding: (01)00614141999996(17)281231(10)LOT123(21)SN9876 encodes GTIN, expiry, lot, and serial. DSCSA, FDA UDI, and EU FMD all require GS1 DataMatrix specifically.

Which is better, QR code or Data Matrix?

Depends on the job. For consumer-facing applications (URLs, marketing, payments, restaurant menus), QR wins because every smartphone reads it natively. For industrial applications (pharma serialization, PCB marking, medical devices), Data Matrix wins because it scans at tiny sizes (2.5mm), survives more damage (50% error correction vs 30%), and is the GS1 standard for regulated industries.

Is a Data Matrix a barcode?

Yes — Data Matrix is a 2D barcode (also called a matrix barcode). It encodes data in a grid of black-and-white modules rather than parallel bars. Like all barcodes, it converts to characters when scanned.

What is an example of a GS1 Data Matrix?

A pharmaceutical product's GS1 DataMatrix might encode: (01)00614141999996(17)281231(10)LOT123(21)SN9876 — meaning GTIN 00614141999996, expiry Dec 31 2028, lot LOT123, serial SN9876. The human-readable text below typically prints the same AIs and values for visual verification.

Can I scan a Data Matrix with a phone?

Yes — modern iOS and Android cameras decode Data Matrix natively. Older 1D laser scanners can't read it; you need a 2D imaging scanner or a camera-based reader. Apps like Orca Scan and Scandit support Data Matrix on any smartphone.

Related generators