Back to definitions

ZPL (Zebra Programming Language)

A command language for controlling Zebra label printers, allowing you to programmatically define label layouts including text, barcodes, QR codes, and graphic elements.

Official documentation Updated:

What is ZPL?

ZPL (Zebra Programming Language) is a command language for controlling thermal label printers from Zebra Technologies. With ZPL commands, you define the complete layout of a label: text positions, font sizes, barcodes, QR codes, lines, and boxes. A ZPL label always starts with ^XA (start label) and ends with ^XZ (end label). In between, you place commands such as ^FO for position, ^A0 for font, ^FD for text, and ^BQ for a QR code. The printer receives these instructions as plain text and translates them directly into a printed label.

How does ZPL work?

A ZPL label is constructed by sequentially combining commands. Each command starts with ^ or ~ followed by a two or three-letter code. The most important commands are: ^XA (start label), ^FO (field origin: x,y position in dots), ^A0 (font selection and size), ^FD (field data: the text), ^FS (field separator: end field), ^GB (graphic box: line or box), ^BQ (QR barcode), ^BY (barcode parameters), and ^XZ (end label). Coordinates are expressed in dots, where the resolution depends on the printer (203, 300, or 600 DPI). A 10 by 5 centimeter label on a 203 DPI printer is therefore 800 by 406 dots.

ZPL command overview

^XA                             Start label
^CI28                           Tekenset UTF-8
^PW800                          Printbreedte 800 dots (10 cm)
^LL1200                         Labelhoogte 1200 dots (15 cm)
^LH0,0                          Label home (oorsprong)
^FO40,40^A0N,60,60^FDTekst^FS  Tekst op positie (40,40)
^FO40,110^GB720,4,4^FS          Horizontale lijn
^BQN,2,10                       QR-code, model 2, grootte 10
^FDLA,https://...^FS            QR-data (L=lage foutcorrectie)
^XZ                             Einde label

Example: Wabber shipping label

The ZPL example below generates a 10x15 cm shipping label (standard logistics format) with the Wabber address, a QR code linking to the Digitalization Scan, and a footer with slogan. The label is designed for a 203 DPI Zebra printer (800x1200 dots). The QR code uses error correction level L (low) via the LA prefix, suitable for clean logistics environments.

ZPL source code

^XA
^CI28
^PW800
^LL1200
^LH0,0

^FO40,40^A0N,60,60^FDWabber B.V.^FS
^FO40,110^GB720,4,4^FS

^FO40,140^A0N,30,30^FDBredasweg 79^FS
^FO40,180^A0N,30,30^FD4872 LA Etten-Leur^FS
^FO40,220^A0N,30,30^FDNederland^FS

^FO60,300
^BQN,2,10
^FDLA,https://wabber.nl/digitaliseringsscan^FS

^FO420,330^A0N,36,36^FDScan de QR voor onze^FS
^FO420,380^A0N,42,42^FDDigitaliseringsscan^FS

^FO40,1120^GB720,4,4^FS
^FO40,1150^A0N,26,26^FB720,1,0,C^FDVolgsystemen. Slimmer door AI. | wabber.nl\&^FS

^XZ

The result

The ZPL program above produces a professional 10x15 cm shipping label. The printer renders the company name as header, draws separator lines, places the address block, and generates a QR code with the URL to the Digitalization Scan. At the bottom of the label, a footer with slogan and website is printed. In production, the WMS automatically generates this type of label with variable data per order, shipment, or location.

Label example (visual)

+--------------------------------------------------+
|                                                  |
|  Wabber B.V.                                     |
|  ----------------------------------------------  |
|                                                  |
|  Bredaseweg 79                                   |
|  4872 LA Etten-Leur                              |
|  Nederland                                       |
|                                                  |
|   +----------+                                   |
|   |  ######  |  Scan de QR voor onze             |
|   |  # QR #  |  Digitaliseringsscan              |
|   |  ######  |                                   |
|   +----------+                                   |
|                                                  |
|                                                  |
|  ----------------------------------------------  |
|    Volgsystemen. Slimmer door AI. | wabber.nl    |
|                                                  |
+--------------------------------------------------+

Frequently asked questions

What is ZPL?

ZPL (Zebra Programming Language) is a command language for controlling Zebra label printers. With ZPL, you define label layouts as plain text with commands for text, barcodes, QR codes, and graphic elements. Because ZPL is a text-based format, it can be generated from any software system, such as a WMS, ERP, or production line controller.

Which printers support ZPL?

ZPL is supported by virtually all Zebra Technologies label printers, from compact desktop models to industrial high-speed printers. Additionally, many printers from other manufacturers support ZPL as a compatibility mode. Wabber supplies and manages Zebra printers through the Hardware & MDM program and ensures proper configuration.

How do I send ZPL to a printer?

ZPL can be sent to a Zebra printer in several ways: via a network connection (TCP port 9100), via USB, via a serial port, or via Zebra's cloud platform Zebra PrintConnect. In Wabber's WMS, ZPL is automatically sent via the network to the correct printer based on the employee's workstation.

Can I combine ZPL with QR codes?

Yes, ZPL has built-in support for QR codes via the ^BQ command. You specify the error correction level (L, M, Q, or H), the size, and the data. The printer generates the QR code directly on the label without external software. In practice, this is widely used for track-and-trace labels, where the QR code contains a URL linking to real-time shipment information. For pre-testing or generating QR codes, qrencode is an excellent open-source command-line tool.

How can I preview a ZPL label without a printer?

With the online Labelary viewer you can paste ZPL code directly in the browser and view a visual preview of the label. This is ideal for testing layouts before sending to the printer. Note: if privacy or data protection is a requirement, for example within an ISO 27001 environment, use the local version of Labelary available on GitHub. This processes the ZPL entirely on your own machine without sending data to external servers.

Digitalization Scan

Free scan in 2 minutes - discover where you stand.

Start the scan

Processes that improve themselves?

Schedule a no-obligation 30-minute consultation. Discover how tracking systems with AI measurably improve your operation.