ZPL, the Zebra Programming Language, is the command language that Zebra label printers understand. Instead of sending an image, software sends a short text with instructions: place this text here, print this barcode there, draw a box around it. The printer renders the label itself, which makes printing fast and sharp. Many other thermal label printers also support ZPL, and carriers often supply shipping labels as ZPL.
How a ZPL Label Is Built
Every label starts with ^XA and ends with ^XZ. In between, each field gets a position, content and format. A simple example:
^XA
^FO50,50^A0N,40,40^FDOrder 12345^FS
^FO50,110^BCN,100,Y,N,N^FD8712345678906^FS
^XZ
This prints the text "Order 12345" and a Code 128 barcode below it with its human-readable number.
Common Commands
^FO(field origin): the position of a field, in dots from the top-left corner.^A: the font and size of text.^FD...^FS: the field data and the end of the field.^BC,^BE,^BQ,^BX: barcodes such as Code 128, EAN-13, QR code and Data Matrix.^GB: lines and boxes.^PQ: the number of copies.
Positions are measured in dots, so the same layout prints at a different size on a 203 dpi printer than on a 300 dpi printer. Good templates take the printer resolution into account.
How Software Prints ZPL
Software usually sends ZPL straight to the printer over the network (raw printing, typically on port 9100), via USB, or through a print server. In practice, labels are built from templates with variables, such as product, batch number, address and barcode, so the layout is designed once and filled in for every label. Online ZPL viewers help to preview a label before printing.
Where ZPL Is Used
Shipping labels from carriers and platforms such as Sendcloud and PostNL, product and pallet labels in warehouses, goods receipt labels, and labels with GS1 barcodes carrying batch numbers and expiry dates. We generate ZPL labels in barcode scanning apps, warehouse management software and carrier integrations.
Frequently Asked Questions
What is a ZPL file?
A text file containing ZPL commands for one or more labels. It can be sent directly to a compatible printer, which prints the labels it describes.
Can ZPL print on non-Zebra printers?
Many thermal label printers from other brands support ZPL or a ZPL emulation, but check this per printer model.
How do I convert ZPL to PDF or an image?
With a ZPL viewer or rendering library that interprets the commands and draws the label. That is useful for previews and archiving.