ZPL Viewer Online
Use this ZPL viewer to paste Zebra code and see the label before it prints. The picture is a layout preview. Print sends the code you pasted, not a photo of that preview. No signup. It runs in the browser on Mac and Windows. Short jobs paste here. A long file can paste straight into the viewer.
Paste ZPL, see the label, and print that same code to your Zebra. Free. No signup. The picture on this page is a layout preview. Print sends the code you pasted, not a photo of the preview.
How to preview a ZPL file
Paste the ZPL into the box, or open the file, and the label draws in this browser. No signup.
- Paste the job, or use Open a .zpl file for a .zpl or a .txt file. You can drop a file on the box. A .prn is the same text, so paste it or drop it. The box keeps 8000 characters.
- A label runs from ^XA to ^XZ. Each field starts with ^FO and ends with ^FS. The words or the barcode data sit in ^FD.
- Pick the DPI on the Zebra. Most shipping desktops are 203. Some ZD421 and ZT411 units are 300. A 600 dpi head is the small-text model. Set width and height to the roll, in inches.
- The picture draws when the page loads. Click Render after you edit. When the file has ^PW and ^LL, those dots replace the width and height. The caption divides them by the DPI you picked.
- Click Print this ZPL when the layout looks right. The form opens the app with the same code, the DPI, and the size. This page draws the picture. It does not send the job to the printer.
^FD shows as words. ^BC is a bar sketch, not a Code 128 a scanner can trust. ^BQ is a square marked QR. ^GF is a gray block. The ZPL tutorial walks through ^XA, ^FO, ^A0, ^BC, and ^BQ.
DPI, dots, and label size
The printer counts dots, not inches. 203 dpi is 8 dots per millimeter. 300 dpi is 12 dots per millimeter. 600 dpi is 24 dots per millimeter. Read the printhead before you trust the inch line under the picture.
| Printhead | Dots per mm | 4 by 6, ^PW by ^LL | 2 by 1, ^PW by ^LL |
|---|---|---|---|
| 203 dpi | 8 | 812 by 1218 | 406 by 203 |
| 300 dpi | 12 | 1200 by 1800 | 600 by 300 |
| 600 dpi | 24 | 2400 by 3600 | 1200 by 600 |
A 4 by 6 label is 812 by 1218 dots at 203 dpi and 1200 by 1800 dots at 300 dpi. A 2 by 1 label is 406 by 203 dots at 203 dpi. ^PW sets the width in dots and ^LL sets the length. ^FO50,50 is 50 dots from the left and 50 from the top. Four times 203 is 812, so a 4 inch roll at 203 wants ^PW812, and six times 203 is ^LL1218. At 300 dpi that face is ^PW1200 and ^LL1800. Leave ^PW812 on a 300 dpi head and the printer uses about 2.7 inches, so the print sits on the left of a wider roll. On this page, when both ^PW and ^LL are present, the picture fits the box and a wrong DPI changes the inch caption only. Without those two, a higher DPI shrinks the fields into the corner. Other sizes are on the DPI calculator. The usual ship-to roll is the Zebra 4x6 label template.
Supported ZPL commands
This preview only uses the commands in the table. It is a layout picture, not a firmware raster. A row that says no is ignored on the picture. The original text is still what Print this ZPL carries to the app.
| Command | Used here | What you get |
|---|---|---|
| ^PW | Yes | Width in dots, divided by the DPI you picked. |
| ^LL | Yes | Length in dots, the same way. |
| ^FO | Yes | Field origin. x and y dots. The field must end at ^FS. |
| ^FS | Yes | Closes the field. No ink. Without it, that field is skipped. |
| ^FD | Yes | Words or barcode data. Text stops at 60 characters. A barcode caption stops at 40. |
| ^A0 | Yes | Height only, and only with a rotation letter. Width and rotation are ignored. |
| ^BC | Yes | Bar sketch from the height number. Not a scannable Code 128. |
| ^BQ | Placeholder | A square labeled QR. Modules are not drawn. |
| ^GF | Placeholder | A gray box labeled ^GF. The bitmap is not decoded. |
| ^XA | No | Not read. A Zebra still wants it at the start. |
| ^XZ | No | Not read. Missing it does not blank this picture. |
| ^BY | No | Module width is ignored. |
| ^GB | No | A graphic box is not drawn. |
| ^FR | No | Reverse print is not drawn. |
| ^CI | No | Encoding is ignored. The page font is used. |
^A0N,50,50 uses the height and clamps it between 10 and 32 pixels. ^A0R still draws left to right. Two jobs draw on one picture, and only the first ^PW and the first ^LL set the size. ^FT, ^FB, ^FH, ^CF, ^LH, ^LS, ^PQ, ^SN, and ^FN are ignored. A field that is not ^BC, ^BQ, or ^GF still shows ^FD in a plain font, even when the command was ^AD. To place the words on a label instead, use the Zebra label maker and templates.
Copyable ZPL examples
Each line is a whole job, from ^XA to ^XZ. The sentence under it is what this page draws. None of these is postage.
Shipping 4 by 6 at 203 dpi
^XA^PW812^LL1218^FO50,50^A0N,40,40^FDFROM: Acme Shop, 123 Main St, Austin TX 78701^FS^FO50,250^A0N,60,60^FDSHIP TO:^FS^FO50,330^A0N,50,50^FDJane Doe^FS^FO50,390^A0N,50,50^FD456 Oak Ave, Denver CO 80202^FS^FO50,600^BY3^BCN,200,Y,N,N^FD1234567890^FS^XZA 4 by 6 ship-to at 203 dpi, with Code 128. ^BY3 is in the file. This preview ignores it.
Code 128 with ^BC
^XA^FO50,50^BY2^BCN,100,Y,N,N^FDSKU-1001^FS^XZ^BCN,100 draws SKU-1001 as a bar sketch. ^BY2 is for the printer. This page does not apply it.
QR with ^BQ
^XA^FO50,50^BQN,2,6^FDQA,https://mylabelmaker.com^FS^XZ^BQN,2,6 points at https://mylabelmaker.com. You get a square marked QR, not the real modules.
Font with ^A0
^XA^FO50,50^A0N,50,50^FDHello Zebra^FS^XZ^A0N,50,50 draws Hello Zebra from the height number. The width number is ignored.
Graphic with ^GF
^XA^FO50,50^GFA,8,8,1,FF818181818181FF^FS^XZThose ^GF bytes become a gray block. The bitmap itself is not painted.
One-line test
^XA^FO20,20^A0N,30,30^FDTest^FS^XZIf Test shows here and the Zebra is blank, check media type, darkness, and calibration.
Print ZPL straight to a Zebra
Print this ZPL does not talk to the printer from this page. It submits the form with method get and opens the app with the code you pasted.
The form sends tool set to zpl, the text in the box (8000 characters at most), the dpi, and w and h in inches. The file input is not sent. Render only replaces the SVG. They do not build a PNG or a PDF. The note under the buttons is that handoff: the app gets the code you pasted, not a photo of the preview.
The printer has to speak ZPL, which means a Zebra. DYMO, Brother, and Rollo do not. For a 4 by 6 pack face, follow print shipping labels on a Zebra. Load the roll the job was written for. A 4 by 6 job will not land cleanly on a 2 by 1 roll.
Common ZPL preview problems
Blank preview, a half label, cut-off text, and a barcode that runs wide are the four that show up at a packing table.
Blank preview. On a Zebra, a missing ^XZ can make the printer wait, so check ^XA and ^XZ if nothing feeds. This page does not look for those two. The picture stays empty when there is no ^FO that ends with ^FS, and the line you see is: Add ^XA, a ^FO field, and ^XZ. A ^FO past ^PW is clipped, so the label looks blank. The wrong DPI shrinks fields into the corner only when the file has no ^PW and no ^LL. When both are present, a wrong DPI changes the inch caption and leaves the fields where they are.
Half a label. If ^PW is narrower than the roll, the printer still feeds the full label and the print covers only part of the width. At 203 dpi a 4 inch roll wants ^PW812. ^PW406 is 2 inches, which is half of that roll. This preview follows ^PW, so the picture can look finished while the roll is wider. Set ^PW to width times DPI, and ^LL to length times DPI.
Text cut off. This preview keeps 60 characters of ^FD and draws one line. It does not wrap. A long ship-to runs off the edge. ^FB, which wraps text on a Zebra, is ignored here, so the printer may wrap a line this page cuts. If the printer cuts it too, move ^FO left or raise ^PW to the roll.
Barcode too wide. ^BY is the module width in dots. ^BY3 on a long number at 203 dpi can leave the label. This preview ignores ^BY, so a code that fits in the picture can still be too wide on the Zebra. Use ^BY2, or shorten the data, and leave a quiet zone.
ZPL viewer vs Labelary
Labelary draws the label on their server. This page draws a layout picture in your browser, then hands the same code to the app.
| This page | Labelary | |
|---|---|---|
| Where it draws | In your browser, as an SVG | On their server |
| Export | No PNG and no PDF. The picture stays on the page. | PNG and PDF from their renderer |
| Print to a Zebra | Print this ZPL opens the app with the pasted code. This page does not send bytes to the printer. | Returns a picture. It does not send the job to your Zebra. |
| API | None. This page has no render API. | A REST API |
Where their renderer is the better second opinion, see the Labelary alternative.
Other tools
Questions about the ZPL viewer
Is this ZPL viewer online free?
Yes. This ZPL viewer page is free to use. You paste the code, pick 203, 300, or 600 dpi, and the layout draws in the browser. No signup.
How do I open a .zpl file on Windows?
A .zpl file is plain text. Open it in Notepad and paste it, or use Open a .zpl file. That button accepts .zpl and .txt. You can also drop the file on the box. A .prn is the same text, so paste it or drop it.
Is this a ZPL emulator?
No. It is a layout viewer, not a printer emulator. It places ^FO fields, sizes ^A0 from the height, sketches ^BC, and marks ^BQ and ^GF with placeholders. It does not imitate Zebra firmware. The form sends the original code to the app.
Can I convert ZPL to PNG or PDF?
Not from this page. The preview is an SVG. There is no PNG button and no PDF button here. Print this ZPL only opens the same code in the app. When the printer is a Zebra, send the ZPL rather than a photo of the preview.
Is this a Labelary alternative?
For a layout check in your browser, yes. Labelary draws on their server and offers a REST API. This page has no API. See Labelary alternative for the longer split.
Can I print ZPL from the browser?
The Print this ZPL button does not talk to the printer from this page. It opens the app with the code, the DPI, and the size. The script here only draws the preview. The printer has to be a Zebra. DYMO, Brother, and Rollo do not speak ZPL.
Why is the preview blank?
The script found no ^FO field that ends with ^FS. The picture then says: Add ^XA, a ^FO field, and ^XZ. Missing ^XA or ^XZ does not blank this picture by itself. A ^FO past ^PW is clipped. If the file has no ^PW and no ^LL, the wrong DPI shrinks the fields into the corner.
What if I need to design the label instead?
You can design the label in the app and open that template. It starts as a 4 by 6 shipping face. Use it when you do not already have ZPL, and come back here when a file handed you the code.