What is a ZPL file? How to open it and convert it to PDF
You downloaded a shipping label, but instead of a PDF you received a .zpl file. Double-clicking it may show a list of commands or ask which application to use. That does not necessarily mean the file is damaged. ZPL describes how a compatible printer should build a label. To see the finished design on screen, you need a viewer that understands those instructions. Here is how to inspect the file, preview it and create a PDF without confusing the three tasks.

What does a ZPL file contain?
ZPL stands for Zebra Programming Language. A label file commonly contains text instructions for field positions, fonts, lines, barcode data and graphics. It is a description of a label rather than a photograph of one. Two files can produce similar-looking labels while using different commands. A long block of encoded graphic data is also normal and should not be removed simply because it is difficult to read.
A typical ZPL II format starts with ^XA and ends with ^XZ. Inside, ^FO sets a field position, ^FD introduces its data and ^FS closes the field. These markers help identify a simple label, but a print job can also contain setup commands or references to stored resources. A file extension alone is not proof of the content: renaming a PDF to .zpl does not turn it into printer instructions.
How to open a ZPL file on Windows or Mac
Keep an unchanged copy first. On Windows, choose a plain-text editor such as Notepad; on macOS, use a plain-text or code editor. Inspecting the commands is useful when you want to find a tracking number or check whether a download contains real label data. It does not render the finished label. Avoid saving through a word processor that adds document formatting or changes quotation marks.
If you see an HTML error page, a login message or an empty file, return to the system that generated the download and obtain the label again. Do not try to repair a missing download by changing the extension. If you see short commands such as N, A and P rather than a ZPL format, check whether the file is EPL. Different printer languages need different interpretation.
Compare ZPL and EPLHow to view the label online
Open the ZPL viewer, import the file or paste its full contents into the code area, then inspect the preview. Start with one label. Confirm the physical width and height and select the DPI of the intended printer. If the tool detects a size, check it against your actual stock rather than accepting it without review. Compare the preview with any reference supplied by your carrier or label system.
Check that text is readable, the address is complete, the barcode has clear space around it and nothing touches a clipped edge. A preview helps inspect layout, but it is not a guarantee that every device-specific command or downloaded font has been reproduced. Before using a shipping label operationally, test the output and verify the barcode data. Use sample details when asking someone else for help.
Open the ZPL viewerWhy label size and DPI change the result
Many ZPL dimensions are expressed in printer dots. DPI tells you how many dots fit in one inch. An 812-dot width is four inches at 203 DPI, but only about 2.71 inches at 300 DPI. Selecting a different DPI without adapting the layout changes its physical scale. For a four-inch width at 300 DPI, the equivalent width is 1,200 dots; positions, fonts and barcode modules also need appropriate sizing.
The formula is dots = millimeters ÷ 25.4 × DPI. Commands such as ^PW and ^LL specify print width and label length, but a file may depend on existing printer settings. If those dimensions are absent or ambiguous, use the intended media size. Do not assume a 100 × 150 mm label is exactly the same as a 4 × 6 inch label: the latter measures 101.6 × 152.4 mm.
How to convert ZPL to PDF
Open the ZPL-to-PDF tool and import the original file or paste the commands. Set the correct label dimensions and DPI, inspect the preview, and download the PDF. Open the downloaded document in a PDF reader to check the page size and orientation. Converting renders the instructions into a page; simply changing the filename from .zpl to .pdf cannot do this.
EditorZPL exports the rendered label image into a PDF page at the selected physical size. This is useful for sharing or printing through a PDF workflow, but the PDF is not the original editable ZPL template. Keep both files. When printing, choose actual size or 100% and check that the driver is not adding margins or fitting the label to A4 or Letter. If your input contains several labels, verify the output page count instead of assuming every label was included.
Convert ZPL to PDFA small ZPL file you can test
The example below defines a 400 × 240 dot label with a short text field. At 203 DPI, that corresponds to approximately 50 × 30 mm. It uses no external fonts or downloaded images, making it a convenient starting point for testing the viewer. Open it in the editor and confirm the dimensions and 203 DPI setting before comparing the result.
If this simple example appears correctly but your original does not, compare the files gradually. Add one text field, barcode or graphic at a time. This makes it easier to identify an unsupported command or missing resource than changing many parameters together. Keep the untouched original so that a useful test does not accidentally replace a production label.
^XA
^PW400
^LL240
^FO30,30^A0N,30,30^FDHELLO ZPL^FS
^XZBlank preview, missing logo or incorrect characters?
For a blank preview, check that you imported the whole label, that the format has its closing command and that fields fall inside the configured page. For cropped output, compare dimensions, coordinates and orientation. A missing logo may indicate a resource stored only on the physical printer or a graphic instruction the viewer does not support. A font substitution can change text width and line breaks.
Unexpected accented characters can indicate a mismatch between the file encoding and the character set used by the label. Work from the original export instead of repeatedly copying through formatted documents. If a printer outputs raw commands as text, investigate its language, driver and diagnostic settings; that is a separate issue from opening a file on your computer. Validate a small printed sample before sending a full batch.
Frequently asked questions
Can I open ZPL without a Zebra printer?
Yes. A text editor shows the instructions and a compatible viewer renders supported label elements. A printer is only needed to test the physical output.
Is a ZPL file the same as a PDF?
No. ZPL contains printer instructions; PDF stores a page representation. A converter must interpret the instructions to produce the PDF.
Can I print the converted PDF on an ordinary printer?
You can use a PDF printing workflow if the printer and media are suitable. Check actual size, page dimensions and barcode readability; converting does not make every paper or printer appropriate for shipping labels.
Will the preview exactly match my printer?
Not necessarily. Fonts, stored graphics, supported commands and printer settings can differ. Use the preview to check layout and validate critical labels on the target device.
Official references
References checked on 4 October 2026. AI-generated conceptual illustration.
About the author
Eduard Diaz
Eduard Diaz is an IT technician (development) at S-IE, an official Zebra partner with more than 20 years providing identification and labelling services. He builds and maintains EditorZPL to make working with ZPL and Zebra label printers easier.
s-ie.cat