What is ZPL? Zebra Programming Language Explained
Updated June 23, 2026
ZPL (Zebra Programming Language) is the command language that Zebra and Zebra-compatible thermal printers use to describe labels. Instead of receiving a finished image the way an office printer does, a ZPL printer receives a short block of plain text — commands that say “put this text here, draw this barcode there, print one copy” — and renders the label itself, at full printer resolution, in milliseconds.
That design is why ZPL has dominated shipping, warehouse, retail and healthcare labelling since the 1980s: the data sent to the printer is tiny, it can be generated by anything that can produce text (an ERP system, a script, a browser), and the printer hardware does the heavy lifting. Virtually every Zebra printer made since the early 1990s speaks ZPL II, the revision in use today, and so do many printers from other brands that advertise “ZPL-compatible” emulation.
What a ZPL label looks like
A ZPL document is a sequence of commands, each starting with a caret (^). Every label is wrapped between ^XA (start format) and ^XZ (end format). Here is a complete, working label:
^XA
^CF0,40
^FO50,50^FDHELLO WORLD^FS
^FO50,110^GB700,4,4^FS
^BY3,2,100
^FO150,150^BCN,100,Y,N,N^FD12345678^FS
^XZReading it line by line:
^XA…^XZ— open and close the label format. Everything in between describes one label.^CF0,40— set the default font to the scalable font 0 at 40 dots tall.^FO50,50— Field Origin: position the next field 50 dots from the left and 50 dots from the top.^FDHELLO WORLD^FS— Field Data followed by Field Separator: the actual content of the field.^GB700,4,4— draw a Graphic Box 700 dots wide and 4 dots tall — here used as a horizontal rule.^BY3,2,100then^BCN,100,Y,N,N— set barcode defaults (module width, ratio, height), then render a Code 128 barcode with the data12345678and a human-readable line underneath.
Dots, not pixels: understanding DPI
Every coordinate and size in ZPL is measured in printer dots, and the physical size of a dot depends on the printhead resolution. The common resolutions are 203 dpi (8 dots/mm), 300 dpi (12 dots/mm) and 600 dpi (24 dots/mm). On a 203 dpi printer a 4 × 6 inch shipping label is 812 × 1218 dots; on a 300 dpi printer the same label is 1200 × 1800 dots. ZPL written for one resolution prints smaller or larger on another, which is the single most common cause of “my label looks wrong on the new printer” — sizes must be scaled to the target DPI.
ZPL vs. EPL vs. driver printing
You may also run into EPL (Eltron Programming Language), an older, simpler language that some legacy desktop printers use; modern Zebra printers accept both, but new work should target ZPL. The alternative to either is driver-based printing, where a Windows or CUPS driver converts a rendered page into printer commands for you. Drivers are convenient for printing from Word or a PDF viewer, but raw ZPL gives you precise placement, sharper barcodes, far smaller payloads and the ability to print from systems where installing drivers is impractical — which is why label software ultimately speaks ZPL.
How to write — or generate — ZPL
For a one-off label, writing ZPL by hand with a command reference open is perfectly doable: the language is small, and a handful of commands (^FO, ^FD, ^A, ^BC, ^GB) covers most real labels. The pain starts when you need to iterate on a layout — every nudge means editing dot coordinates, re-sending the file and wasting label stock.
That is the problem visual designers solve. ZPLCraft gives you a true-to-size canvas where you drag text, barcodes, lines and boxes into place and the matching ZPL is generated for you — correctly scaled for your printer’s DPI, with barcodes that scan. You can export the code into any system that already sends ZPL, or print straight from the browser over USB without installing anything.
Frequently asked basics
Is ZPL free to use?
Yes. ZPL is a de-facto open standard: Zebra publishes the full ZPL II programming guide, and there is nothing to license. Any text editor can produce it.
What file extension does ZPL use?
There is no required extension — ZPL is plain text. You will see .zpl, .txt and .prn in the wild; printers do not care, they just consume the byte stream.
Can I preview ZPL without a printer?
Yes — rendering services such as Labelary convert ZPL to an image, and ZPLCraft’s editor shows a live preview of the label as you design, so you only spend label stock when the layout is final.