Skip to content

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.

^XA
^FO50,50^ADN,36,20^FDLabelZoom^FS
^FO50,120^BCN,100,Y,N,N^FD12345678^FS
^XZ

This label prints the text LabelZoom and a Code 128 barcode that encodes 12345678.

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

These free tools run in your browser:

The LabelZoom API converts ZPL in both directions, for example POST /api/v2/convert/zpl/to/pdf.