zplCloud

Barcodes

Barcodes in ZPL - 1D and 2D symbologies

ZPL renders barcodes natively on the printer - no images required. The two most

Barcodes in ZPL - 1D and 2D symbologies

ZPL renders barcodes natively on the printer - no images required. The two most

important commands are ^B* (barcode type) and ^FD (data).

Linear barcodes (1D)

^XA
^FO50,50^BY2,2,80^BCN,80,Y,N,N^FD4006381333931^FS
^XZ
  • ^BY2,2,80 - barcode defaults: module width 2 dots, wide/narrow ratio 2, height 80 dots
  • ^BCN,80,Y,N,N - Code 128, normal orientation, height 80, print interpretation line (Y),

no interpretation line above (N), no UCC check digit (N)

Common symbologies:

SymbologyCommandExample data
----------------------------------
Code 128^BC^BCN,80,Y,N,N
Code 39^B3^B3N,80,N,N,N
EAN-13^BE^BEN,80,Y,N
EAN-8^B8^B8N,80,Y,N
UPC-A^BU^BUN,80,Y,N
Code 93^B9^B9N,80,Y,N,N
Interleaved 2 of 5^BI^BIN,80,Y,N
Codabar^B2^B2N,80,Y,N,N
POSTNET^BP^BPN,80,N,N
MSI^BM^BMN,80,Y,N
PDF417^B7^B7N,80,5,5

2D barcodes

^XA
^FO50,50^BQN,2,8^FDMM,https://example.com^FS
^XZ
  • ^BQN,2,8 - QR Code, normal orientation, magnification 2, error correction 8 (≈30 %)
  • ^FDMM, - QR mode: MM = auto/binary, QA = alphanumeric, QN = numeric.

Data follows after the comma.

GS1-128 (EAN-128): use ^BC with the >; FNC1 prefix:

^BCN,80,Y,N,Y^FD>;0104006381333931^FS

Tips

  • Module width (^BY first parameter) is the most common print-quality issue:

1 dot is too thin for many media types; 2–3 is typical.

  • EAN/UPC data is fixed length - the printer adds check digits automatically.
  • Keep the quiet zone (white space) around the barcode: at least 10× module width.