Skip to content

TSPL viewer

Paste TSPL or TSPL2 code and the label is drawn as you type. Download it as PDF or PNG, or convert it to ZPL to print it on a Zebra printer.

Paste your TSPL

Preview

100%

Convert to ZPL

Each label is drawn at the size and density above and written as one ^GFA graphic: it prints the same on any ZPL printer.

How to use it

  1. Paste your TSPL, or open a .tspl, .prn or .txt file.
  2. Pick the label size and the print density of your printer.
  3. Download the label as PDF or PNG, or convert it to ZPL below.

From your own code

curl https://api.openzpl.com/v1/printers/8dpmm/labels/4x6/ \
  -H "X-Language: tspl" -H "Accept: application/pdf" \
  --data-binary @label.tspl > label.pdf

More tools

Questions

What is TSPL?

TSPL (and TSPL2) is the command language of TSC label printers and many low-cost thermal printers. A label starts with SIZE and CLS, adds TEXT, BARCODE, QRCODE, BOX and BAR lines, and ends with PRINT.

Does the label size come from SIZE?

The preview uses the size you pick here, in inches, like the ZPL viewer. Match it to the SIZE line so the label is cut where the printer cuts it.

Can I call this from my code?

Yes. POST the TSPL to the OpenZPL API, the same endpoint as ZPL, with the header X-Language: tspl. A body without ^ or ~ is recognised as EPL or TSPL on its own.

Feedback