What is ZPL?
ZPL (Zebra Programming Language) is the command language of Zebra thermal label printers. A ZPL file is plain text that tells the printer where to draw text, barcodes, lines, and graphics. The current version is ZPL II.
Zebra ZD, ZT, and GK series printers use ZPL, and many other thermal printers emulate it. Warehouse and ERP systems, carrier APIs such as FedEx, UPS, and USPS, and marketplaces such as Shopee and Mercado Livre commonly produce ZPL as .zpl or .txt files.
Zemax lens-design files also use the .zpl extension. A file without ^XA isn’t a ZPL label.
Example
Section titled “Example”^XA^FO50,50^ADN,36,20^FDLabelZoom^FS^FO50,120^BCN,100,Y,N,N^FD12345678^FS^XZThis label prints the text LabelZoom and a Code 128 barcode that encodes 12345678.
Common commands
Section titled “Common commands”| Command | What it does |
|---|---|
^XA |
Starts a label |
^XZ |
Ends a label |
^FO |
Sets the field origin, in dots |
^A |
Selects a font |
^BC |
Draws a Code 128 barcode |
^FD |
Holds the field data |
^FS |
Ends the field |
Convert ZPL files
Section titled “Convert ZPL files”These free tools run in your browser:
- ZPL viewer: see a label without a printer.
- ZPL to PDF: get a printable PDF.
- PDF to ZPL: create ZPL from a PDF or image.
The LabelZoom API converts ZPL in both directions, for example POST /api/v2/convert/zpl/to/pdf.
What’s next
Section titled “What’s next”- How to open a ZPL file
- How to convert ZPL to PDF with the API
- Supported formats
- Other printer languages: EPL, IPL, TSPL, DPL, and SBPL