What Is a ZPL File?
A ZPL file is a label for a Zebra printer, written as text commands in the Zebra Programming Language. This guide covers what is inside one, how to open it and see the label, how to print it with or without a Zebra printer, and how ZPL differs from ZPL II and EPL.
Updated
Open the ZPL viewerWhat ZPL is
ZPL, the Zebra Programming Language, is the language Zebra label printers read. A label is described in text commands: where each field goes, which font and size it uses, what text or barcode data it holds, and which lines, boxes and pictures it has. Zebra calls ZPL II a label-definition and printer-control language. The printer reads the commands and prints the label when the label's last command arrives.
Labels are usually written by software rather than by hand: Zebra's guide mentions label preparation systems and software packages that generate ZPL II code. So if a system gave you a ZPL file where you expected a picture, the file holds the label's instructions, and a printer or a viewer turns them into the label.
ZPL is current. Zebra published a new revision of its ZPL II programming guide in July 2026, and the spec sheet of its ZD421 desktop printer calls ZPL II the "universal language for Zebra printers".
What is inside a ZPL file
Open a ZPL file in a text editor and you see commands. Each one is a caret (^) or a tilde (~), a short code, usually two characters, and, where the command needs them, its values. Caret commands, which Zebra calls format commands, describe the label. Tilde commands, control commands, make the printer act at once, such as clearing its memory or feeding a blank label.
This is a whole label: ^XA^FO50,50^A0N,50,50^FDHello^FS^XZ
^XA starts the label. ^FO50,50 puts the next field 50 dots from the left and 50 from the top. ^A0N,50,50 chooses font 0, upright, 50 dots high and 50 wide. ^FD holds the text, ^FS ends the field, and ^XZ ends the label, which is when the printer prints it. A file can hold many labels, one after another. These are the commands you will meet most:
| Command | What it does |
|---|---|
^XA | Starts a label |
^XZ | Ends the label; the printer prints it when this arrives |
^FO | Sets where a field starts, in dots from the label home, the top left corner unless ^LH moves it |
^FT | Sets a field's position like ^FO, but from a point fixed to the field's contents that does not change with rotation |
^A | Chooses the font, direction and size for the next field |
^CF | Sets the default font for the fields after it |
^FD | The field's data: the text to print, or the data of a barcode |
^FS | Ends a field |
^FB | Wraps a field's text in a block of a set width and number of lines |
^GB | Draws a box or a line |
^GF | A picture, as dots in hexadecimal, binary or compressed form |
^BY | Sets the narrow bar width, the wide-to-narrow ratio and the height for the barcodes after it |
^BC, ^BE, ^BQ, ^BX | Barcodes: Code 128, EAN-13, QR code and Data Matrix |
^PW, ^LL | The print width and the label length, in dots |
^PQ | How many copies to print |
^CI | The character set, such as ^CI28 for UTF-8 |
^FX | A comment, which does not print |
Every size is in dots, so the same file prints at a different size on printers of different density: 50 dots is about a quarter of an inch at 203 dpi and a sixth of an inch at 300 dpi. The ZPL examples show these commands in whole labels, and ZPL fonts lists each font's size.
How to open a ZPL file and see the label
A ZPL file is plain text, so any text editor opens it and shows the code; Zebra's own documentation uses Windows Notepad to write ZPL files. The file may end in .zpl, .txt, .prn or .lbl, but a text editor shows only the commands, not the label. To see the label without printing it:
- Open the ZPL viewer and drop the file on it, press Open file, or paste the text.
- Choose the print density of the printer the label is for. The viewer starts at 8 dpmm (203 dpi); Zebra's guide says a printer's density is listed on its configuration label.
- Choose the label size, or the size the ZPL sets, when the viewer offers it.
- Read the line under the preview: it gives the label's size in dots and lists any command that was not drawn.
A file named .prn is not always ZPL. If it holds no ^XA label, the viewer says "No label found. Start a label with ^XA."
How to print a ZPL file on a Zebra printer
A Zebra printer that runs ZPL reads the file as it is, so the file is sent to the printer unchanged rather than printed like a document. Zebra documents these ways:
- Zebra Setup Utilities on Windows. Zebra's user guides name it, with Link-OS Profile Manager, ZebraNet Bridge and ZDownloader, as programs that send programming files to a printer from Windows, available from zebra.com/software.
- Copy the file to the printer. Zebra's programming guide suggests saving ZPL as a text file and copying it to the printer from the command line. A Zebra user guide gives the example for a printer on a computer's serial port:
COPY TEST.ZPL COM1. Zebra notes that other connections and operating systems need other commands, described in the operating system's documentation. - Send it over the network. For a printer on Ethernet or Wi-Fi, Zebra's user guides connect to the printer's IP address, which is printed on its network configuration report, with
ftp, then send the file by typingputand the file name.
Before you send it, check the label in the viewer at the printer's density: it shows where each field, line, picture and barcode will print, without using up a label.
How to print a ZPL label without a Zebra printer
To print on a printer that does not run ZPL, such as an office printer, turn the label into a PDF first:
- Open the ZPL in the ZPL to PDF converter, set the print density and label size, and press Download PDF. Each label is one page at its real size.
- Open the PDF and print it with the scale at 100 percent, not fitted to the page, so the label and its barcodes keep their size.
- Cut the label out of the sheet.
Whether a carrier accepts a label printed on plain paper is the carrier's rule, so check it first.
On a Mac
Zebra's user guides describe sending files to a printer from Microsoft Windows, and say that other operating systems need commands from their own documentation. On a Mac, the viewer and its PDF need nothing installed: open the label in your browser, download the PDF, and print it from Preview, the Mac's own app for PDFs. Apple's steps:
- Open the PDF in Preview.
- Choose File > Print.
- In the Preview section of the print dialog, select Scale and enter 100.
- Choose the printer and print.
Do not choose Scale to Fit, which Apple describes as filling as much of the paper as possible: it changes the size of the label and its barcodes.
ZPL and ZPL II
ZPL II is the version of ZPL that Zebra printers use unless told otherwise. The ^SZ command switches a printer between ZPL (^SZ1) and ZPL II (^SZ2), and its default is ZPL II.
Zebra's 2005 ZPL II guide lists the main differences: ZPL II formats each field as it is received, while standard ZPL waits for ^XZ before it processes the fields, which lets ZPL II start printing sooner; and ZPL II added many new commands. It says ZPL II scripts are not 100 percent compatible with standard ZPL, but that most standard ZPL scripts can be changed easily.
ZPL and EPL
EPL, the Eltron Programming Language, is another label printer language. Zebra printers such as the ZD421 accept it beside ZPL: the ZD421 spec sheet lists "ZPL II and EPL2 programming languages" and says EPL2 gives compatibility with legacy applications. The two have different commands and fonts. Zebra's user guides note that ZPL can use both ZPL and EPL fonts while EPL can use only its own, and that on its G-Series printers, EPL and ZPL must be sent as separate files and cannot be used together in one format.
This viewer draws ZPL only. An EPL file has no ^XA label in it, so the viewer says "No label found. Start a label with ^XA."