Stripy Horse
Stripy Horse

← All guides

How to open a .zpl file (and actually see the label)

A carrier, a marketplace, or a shipping platform just handed you a file ending in .zpl and nothing on your computer will open it. That's because it isn't an image or a document. It's printer code: a program in ZPL (Zebra Programming Language) that a thermal label printer executes.

Three things you might want to do with it, easiest first.

1. Peek inside: it's just text

Open it in any text editor (Notepad, TextEdit, VS Code). You'll see something like:

^XA
^FO50,50^A0N,40,40^FDJOHN SMITH^FS
^FO50,220^BY3^BCN,140,Y^FD420902149405511899560^FS
^XZ

^XA/^XZ bracket one label. ^FO places things at x,y coordinates (in printer dots), ^FD...^FS is field data, ^BC is a Code 128 barcode. Readable, but not exactly a picture of your label. (What is ZPL? goes deeper.)

2. See the label: render it in the browser

Paste the file's contents into the free ZPL viewer, pick the label size (4×6 for almost every shipping label) and density (8 dpmm / 203 dpi unless you know otherwise), and you get a pixel-true preview: exactly what the printhead would produce, barcodes and all. Multi-label files render every label.

Two settings matter, because a .zpl file doesn't record them:

Need a file instead of a preview? The API returns PNGs:

STRIPY_HORSE_API_KEY=""
curl https://api.stripyhorse.io/v1/render \
  -H "X-Api-Key: $STRIPY_HORSE_API_KEY" -H "Content-Type: application/json" \
  -d "{\"zpl\": \"$(cat label.zpl)\", \"preset\": \"4x6\"}"

3. Print it: the file's actual destiny

A .zpl file is meant to be sent to a Zebra printer raw, not through a print dialog, which would helpfully "print" the code as text on the label. The one-liner on Linux/macOS:

cat label.zpl | nc -w 0 YOUR-PRINTER-IP 9100

Our companion guide covers every platform and the traps: how to print ZPL to a Zebra printer. No printer on your desk? Send it to the free virtual Zebra printer and watch it appear rendered on the wall.

Bonus: is the label any good?

Since you're holding ZPL anyway, run it through preflight: it grades every barcode (will it scan? with how much margin?) and lints the ZPL for clipped fields and encoding traps. Useful before you print five hundred of something a scanner will reject.

Stripy Horse is the developer platform for Zebra printing: convert PDFs and images, design labels in HTML, preview ZPL pixel-true, and test against virtual printers in CI. Join the early access or try the free tools.

Published 2026-08-25 · Ben Faerber, software engineer, five years building warehouse fulfillment and label-printing systems; maintainer of pdf-to-zpl (26,000+ installs powering production label generation).