Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›Barcode Types›What Is a Data Matrix Barcode?

What Is a Data Matrix Barcode?

Data Matrix is a two-dimensional barcode that packs a large amount of data into a very small area. Thanks to strong error correction it stays readable even when partly damaged; it is common in industrial part marking and pharmaceuticals.

Data Matrix: DM-TR-4821

Sample data: DM-TR-4821

Create your own Data Matrix barcode →

Key facts

Year1994
StandardISO/IEC 16022
Capacityup to 2,335 characters
NoteA lot of data in a tiny area; common in industry and pharma

Where is it used?

How to print Data Matrix in ZPL

On a Zebra printer a Data Matrix barcode is one command, ^BX. The example below is a complete label; paste it into the preview to see it drawn before you send it to a printer.

^XA
^FO50,50
^BXN,8,200
^FDhttps://labelixa.com/p/4471^FS
^XZ

^BX has no ^BY: the second parameter is the module size in dots (8 here), the third the quality level — 200 is the ECC 200 standard every modern scanner expects. Rows and columns are chosen automatically from the data length.

Open this example in the ZPL preview → · ^BX command reference

Data Matrix vs QR code: which one for your label?

Both are two-dimensional codes, but they solve different problems. A Data Matrix symbol stays readable at much smaller sizes — a 10×10 mm mark on a circuit board or a medicine box is routine — and its ECC 200 error correction recovers the content even when up to ~30% of the symbol is damaged. A QR code needs more space for the same data but any smartphone camera reads it. Rule of thumb: pick Data Matrix for industrial part marking and regulated packaging, pick QR when consumers will scan the code with a phone.

On a printed label, size the symbol by module, not millimetres: each module (one black square) should be at least 3–4 printer dots. At 8 dpmm (203 dpi) a module height of 4–6 gives a symbol that scans reliably; going smaller saves space but fails on worn or curved surfaces. In ZPL the ^BX command draws the symbol:

^XA
^FO60,60^BXN,6,200
^FDLOT42.SN123456^FS
^XZ

GS1 Data Matrix is the same symbol carrying GS1 field data (Application Identifiers), the format used for pharmaceutical serialisation: one small square carries the GTIN (01), expiry (17), batch (10) and serial number (21) at once. That is why the tiny square on a medicine box is a Data Matrix, not a QR code.

Related solutions

Logistics & Shipping

Verify the exact label format your carrier expects on screen, before you send it to the printer.

Warehouse & Racking

Check rack, bin and pallet labels for readability and overflow on screen, before you print and mount them.

ERP & WMS

Render the labels produced by your warehouse and enterprise systems as a service — with no installation, or on-premise.

Business Central

Shipping and barcode labels from Dynamics 365 Business Central: Labelixa reads your posted sales shipments through the standard API, fills a ZPL template, shows the label on screen and prints it through the DirectPrint agent.

Manufacturing

Verify batch, serial and pallet labels before sending them to the production line.

Healthcare & Laboratory

Verify specimen, medication and device labels — GS1 Data Matrix included — on screen before you print them.

Pharma & Serialization

Verify the GTIN + serial + batch + expiry chain in the Data Matrix on screen, before it is printed.

Food & Beverage

Verify the case labels that carry batch and expiry on screen, before they are printed.

Frequently asked questions

What is Data Matrix?

Data Matrix is a two-dimensional barcode that packs a large amount of data into a very small area. Thanks to strong error correction it stays readable even when partly damaged; it is common in industrial part marking and pharmaceuticals.

How much data can Data Matrix hold?

Data Matrix capacity: up to 2,335 characters.

Where is Data Matrix used?

Main uses: Pharmaceutical traceability (data-matrix on medicine boxes), Electronics and automotive part marking, Serial numbers on small products, Document and form tracking.

Is Data Matrix 1D or 2D?

Data Matrix is a two-dimensional (matrix) code.