ZPL / TSPL generator and mm ↔ dots converter

Thermal printers measure in dots, not millimetres. Convert your sizes, then generate the code for a simple label to send to a Zebra printer (ZPL II) or a TSC or compatible printer (TSPL).

Millimetres ↔ dots converter

⇄
Common sizes in dots
Size203 dpi300 dpi
100 × 150 mm799 × 11991181 × 1772
4 × 6″812 × 12181200 × 1800
103 × 199 mm823 × 15901217 × 2350
100 × 100 mm799 × 7991181 × 1181
57 × 32 mm456 × 256673 × 378
50 × 25 mm400 × 200591 × 295
40 × 30 mm320 × 240472 × 354

ZPL / TSPL code generator

    Layout preview

    Approximate preview: the printer uses its own fonts and draws the real barcodes.

    Dots and resolution

    A 203 dpi printer prints 8 dots per millimetre, a 300 dpi printer about 11.8. A 100 mm wide label is therefore 799 dots at 203 dpi and 1,181 dots at 300 dpi. ZPL and TSPL give every position in dots, so the same code printed on a printer with another resolution comes out smaller or larger.

    Sending the code to the printer

    Limits

    The generator covers a simple layout: text lines, one barcode and a frame. The commands follow the ZPL II and TSPL programming manuals, but the output has not been tested on every model: run a test before a large batch. TSPL text uses the built-in bitmap fonts; accented characters depend on the printer’s code page.

    To check that a roll suits your model, use the printer compatibility checker.