Plain English

A 2D barcode that looks like a small square grid of dots — compact, error-correcting, scannable from any rotation. The modern Data Matrix standard (ECC 200) — what GS1 recommends for healthcare and regulated industries. Supports **structured append** (one logical payload split across up to 16 linked symbols) for very long data, and **fixed sizing** via `c`/`r` for layouts where the symbol must hit a specific footprint. (Note: `^BD` is UPS MaxiCode, a different barcode type — not an older Data Matrix.)

When to use

When you need a 2D barcode but space is limited — small component labels, PCB boards, medical devices, GS1 traceability. Set `c` and `r` together for fixed-size symbols (e.g. 18×18) when the label slot is rigid; leave both 0 for the printer to size automatically. Use structured append when the payload exceeds a single ECC 200 symbol's capacity.

Syntax

^BXo,h,s,c,r,f,g,a

Parameters

ParameterDescription
oOrientation: N, R, I, B
hDimensional height of individual symbol elements (1-dot floor)
sQuality level: 0, 50, 80, 100, 140, 200 (200 = ECC 200, recommended)
cColumns to encode: 9-49 (odd values for ECC 0-140, even for ECC 200). 0 = auto.
rRows to encode: 9-49 (odd values for ECC 0-140, even for ECC 200). 0 = auto.
fFormat ID: 1-6 (varies content type — controls ASCII subset and compaction)
gEscape sequence control character (single ASCII character, default ~)
aAspect ratio: 1 (square, default) or 2 (rectangular)

Example

^XA
^FO50,50^BXN,6,200,18,18^FD01034531200000111719112510ABCD1234^FS
^XZ

GS1 Data Matrix forced to 18×18 ECC 200 for a fixed label footprint. Drop `c`/`r` (or set both to 0) for auto-sizing.

Try it in the playground View all ZPL commands