ZPL reference
Learn ZPL. Look up any command.
ZPL is the command language that many thermal label printers read: a label is plain text made of short commands, from a start command to an end command, with commands for each text, line or barcode on it. This reference teaches it in nine short guides and documents each command on its own page, checked against Zebra's programming guide.
^XA ^FO30,25^A0N,36,36^FDPart 4471^FS ^FO30,80^GB280,3,3^FS ^XZ
A whole label format: a start command, two fields, an end command. Guide 1 explains each line.
01 Guides
Nine guides, in reading order.
Start with guide 1, then guide 2: every other guide places something on the label, so each one relies on coordinates.
- 01Start hereWhat is ZPL? The anatomy of a labelZPL is a command language that thermal label printers read. See what a command looks like, how a label starts and ends, and build one small label step by step.^XA^XZ^FO^FD^FS^FX
- 02Read nextCoordinates, dots and print densityZPL places everything in printer dots. Learn how dots relate to millimeters and dpi, where position 0,0 is, how ^FO and ^FT differ, and how rotation and density change a layout.^FO^FT^LH^FW^FP^A
- 03Text and fonts in ZPLChoose a font and size, set a default font, wrap paragraphs in a block, and print accents and the caret and tilde characters. Includes the guide's own advice on ^FB versus ^TB.^A^CF^FB^TB^FD^FH
- 04Linear barcodes: Code 128, Code 39, EAN, UPC and moreThe recipe for any ZPL barcode, how to size one with ^BY, which symbology fits which data, how check digits work, and the quiet-zone and density limits that decide whether it scans.^BY^BC^B3^B2^BE^BU
- 05SSCC-18 pallet label: a worked ZPL exampleA worked ZPL example of a pallet label that prints an SSCC-18 as a Code 128 barcode, explained line by line. It shows the guide's three ways to write the data and where the guide is unclear.^XA^PW^LL^LH^CF^FO
- 062D codes: QR Code, Data Matrix, PDF417How to print QR Code, Data Matrix and PDF417 in ZPL, with the data switches QR needs inside ^FD, plus a short guide to Aztec, MaxiCode and MicroPDF417 and where the guide contradicts itself.^BQ^BX^B7^B0^BO^BD
- 07Boxes, lines, circles and ellipsesDraw rectangles, horizontal and vertical lines, circles, ellipses and diagonals in ZPL, round corners, fill shapes, and print white text on black with ^FR and ^LR.^GB^GC^GD^GE^FR^LR
- 08Printing images and logosThree ways to get a bitmap onto a ZPL label: inline with ^GF, stored with ~DG and recalled with ^XG, or downloaded as PNG with ~DY. Includes the byte arithmetic and the guide's own contradictions.^GF~DG^XG~DY^IM^IL
- 09Label size, quantity and printer settingsTell the printer how big the label is, how many to print, how fast and how dark, and which of those settings survive a power cycle. Notes where the guide says availability depends on the printer model.^LL^PW^PQ^PR~SD^MD
02 Command reference
One page per command.
69 commands in 9 groups. Each page gives the syntax, every parameter with its accepted values and default, notes, one example and the pages of Zebra's guide it comes from.
03 Source
How this reference is made.
Every parameter, accepted value, default and note comes from Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, and carries the page it was taken from. The explanations and examples are written by BarcoderX. Where the guide contradicts itself, the page says so.
ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.