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.

Sample data: DM-TR-4821
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
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.
Verify the exact label format your carrier expects on screen, before you send it to the printer.
Warehouse & RackingCheck rack, bin and pallet labels for readability and overflow on screen, before you print and mount them.
ERP & WMSRender the labels produced by your warehouse and enterprise systems as a service — with no installation, or on-premise.
Business CentralShipping 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.
ManufacturingVerify batch, serial and pallet labels before sending them to the production line.
Healthcare & LaboratoryVerify specimen, medication and device labels — GS1 Data Matrix included — on screen before you print them.
Pharma & SerializationVerify the GTIN + serial + batch + expiry chain in the Data Matrix on screen, before it is printed.
Food & BeverageVerify the case labels that carry batch and expiry on screen, before they are printed.
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 capacity: up to 2,335 characters.
Main uses: Pharmaceutical traceability (data-matrix on medicine boxes), Electronics and automotive part marking, Serial numbers on small products, Document and form tracking.
Data Matrix is a two-dimensional (matrix) code.