Key points
- Paste code, drop a file or open a sample: the label renders as you type.
- Set density and label size first, because ZPL measures everything in printer dots.
- Use hover, click to code, the inspector and warnings to find problems quickly.
- Export PNG for one label, PDF for all labels or a share link for a teammate.
An online ZPL viewer lets you check a Zebra label from any computer, tablet or phone with a browser. There is nothing to install, which is ideal when you are on a locked down work laptop, helping a customer on a call or reviewing a file someone emailed you. This walkthrough uses our free ZPL Viewer, but the same habits apply to any good tool.
Step 1: Get your ZPL into the editor
You have three options:
- Paste code copied from an API response, a log file or a support ticket.
- Open a file with the Open file button or drag it onto the editor. Files ending in .zpl, .prn, .txt and .dat are read as text. A .prn file from a Zebra driver usually contains ZPL with some extra setup commands, and renders normally.
- Load a sample such as the 4 x 6 shipping label if you are learning or want a known good starting point.
If your API returns labels as Base64, decode them first. A string that starts with XlhB is simply Base64 for ^XA.
Step 2: Match the density and label size
This is the step people skip, and it causes most "the preview is wrong" reports. Pick the density that matches your printer: 8 dpmm for 203 dpi, 12 dpmm for 300 dpi, 24 dpmm for 600 dpi. Then choose the label size from the presets or type it in inches, millimetres or centimetres.
Not sure what the code was written for? Look for ^PW (print width). A value of 812 suggests a 4 inch label at 203 dpi, while 1200 suggests 4 inches at 300 dpi.
^XA
^PW812
^LL406
^FO30,30^GB752,346,4,B,2^FS
^FO60,60^A0N,44,44^FDReturn to: Blue Harbor^FS
^FO60,120^A0N,30,30^FDRMA 77120, Bin R2^FS
^BY3,3,120
^FO60,180^BCN,120,Y,N,N^FDRMA77120^FS
^XZStep 3: Read the preview, not only the picture
The label appears on a checkerboard background so you can see its edges. Then dig a little deeper:
- Hover over any element to see its type and x, y position in dots.
- Click an element to select the code that drew it. This is the fastest way to find the line you need to change.
- Use the zoom buttons for fine detail. Above about 150 percent the preview switches to crisp pixels so you see individual printer dots.
- Rotate the view if your printer feeds labels sideways and you want to read the preview the way it comes out.
Step 4: Use the inspector and warnings
The Command inspector lists every command with its meaning. Filter it by typing, for example, BC to see every Code 128 barcode or FO to list positions. The Warnings tab is your to do list: missing ^XZ, unknown commands (often a typo like ^F0 with a zero instead of the letter O), stored graphics that were never downloaded, or barcode types the viewer shows as placeholders.
An unknown command is not always an error. Some printer specific commands have no visual effect. If the inspector lists a command as a printer setting, you can ignore it for preview purposes.
Step 5: Edit and render again
Change a value and the preview redraws a moment later. If you are pasting very large files, you can switch off Live preview and press Ctrl + Enter (or Render label) when you are ready. Use Format to split a one line file into readable lines, and Minify to put it back on one line before pasting into a system that expects that. Our ZPL editor tips cover more techniques.
Step 6: Export, print or share
- PNG saves the label you are viewing at full printer resolution.
- PDF (all labels) creates one page per label at the exact label size. Read ZPL to PDF for printing tips.
- ZPL file downloads your edited code, ready to send to a printer.
- Print sends the rendered images to any printer through your browser, which is handy for paper proofs.
- Share link copies a URL containing your code and settings. Anyone with the link sees the same preview.
A note on privacy
Shipping labels contain names and addresses. Our viewer renders in your browser, so the code is not uploaded. Be careful with share links and screenshots, which do contain the data, and check your company policy before sending labels to third party services that render on their servers.
Preview this in the ZPL Viewer
Paste your code, pick the label size and density, then check every field before you print.
Frequently asked questions
Does the online viewer work on a phone?
Yes. The layout adapts to small screens, and you can paste code, change settings and export a PNG on mobile. For long files, a larger screen is more comfortable.
Why does nothing appear after I paste my code?
The viewer only draws content between ^XA and ^XZ. Check that both are present and that the data is plain ZPL rather than Base64 or a PDF. The warnings tab explains what it found.
Can I preview several labels from one file?
Yes. Every ^XA to ^XZ block becomes a separate label. Use the arrows above the preview to move between them; the PDF export includes them all.
Is there a size limit?
Files up to 25 MB can be opened. Very large graphics may take a moment to render, and syntax colouring switches off for extremely long files to keep typing smooth.



