Introduction
TypeScript tools for ZPL, the language Zebra label printers speak.
ZPL (Zebra Programming Language) is the text format thermal label printers understand. A label is a stream of commands like ^FO50,50 (move to 50, 50) and ^FDHello^FS (print "Hello"). The printer reads the text and draws the label itself, dot by dot.
Writing ZPL by hand is fiddly, and printers don't report mistakes: they quietly clamp values, skip fields or print nothing at all. node-zpl helps at each step:
Build labels
Typed method calls or JSX, with explicit units and automatic escaping.
Parse and lint
Read existing ZPL and find problems before anything is printed.
Preview
Show labels as images in the browser, in any framework.
Send labels to Zebra printers and store graphics on them.
Packages
| Package | What it does |
|---|---|
node-zpl | Build labels with method calls or JSX, parse and lint ZPL |
@node-zpl/preview | <zpl-preview>, a web component that renders ZPL in the browser |
Both are ES modules and need Node 22 or newer. They're open source under the MIT license; the code is on GitHub.
To try ZPL without installing anything, open the playground.