🏷️ Layout to ZPL Converter

📝 Layout Code

Enter the layout code you want to convert to ZPL:

🔧 Variable Values (JSON)

Enter a JSON with the values of the layout variables:

🔗 Test on Labelary

📄 ZPL Code
👁️ Preview
📋 Log
The label preview will appear here after conversion

⚙️ Adjustment Controls

← All DarkBoxKit tools

How to convert a layout to ZPL

ZPL is the command language of Zebra label printers. This tool takes a layout written in another set of commands (PP, FT, PT, PB, PL, BARSET, NASC, MAG), replaces the variables with the values you provide and gives you ZPL code ready to print or test.

  1. Paste the layout code into the box on the left. Variable fields are written in the format ${name}, for example PT "${company}".
  2. In the box on the right, paste a JSON with the values: {"company": "My Company"}. The names must match the ones used in the layout.
  3. If needed, adjust Offset X, Offset Y, the font multiplier and the printer DPI (152, 203, 300 or 600 dpi).
  4. Click Convert to ZPL. The code appears in the "ZPL Code" tab, and the counts of lines, variables and mapped commands are displayed.
  5. Use Generate Preview to see the label and Download ZPL to save a .zpl file.

What the conversion does

The "Log" tab records what was processed, which is useful when something comes out differently than expected. The Visual Editor opens a screen where you drag items to adjust positions without touching the numbers.

Practical examples

Tips

Privacy and how it works

The conversion itself happens in your browser. What you type into the layout, JSON, offset and DPI fields is saved in your browser's localStorage, so it reappears on your next visit. There is one important exception: when you click Generate Preview, the ZPL code is sent to the external Labelary service, which returns the label image. For that reason, avoid real sensitive data if you are going to generate the preview. See also the Privacy Policy.

Frequently asked questions

The preview did not load. What should I do?

It depends on the Labelary service and an internet connection. If an error appears, try again later or paste the ZPL into the Labelary website, linked in the tool itself. The conversion to ZPL keeps working without the preview.

What size is the label in the preview?

The preview is generated in a 4 x 6 inch format. If your label has a different size, the image serves as a reference and the final test should be done on the printer.

A variable appeared as ${name} in the result.

This happens when the name does not exist in the JSON. Check that the spelling is identical, including uppercase and lowercase, and that the JSON is valid.

Which commands are converted?

The ones listed above: PP, PT, PB, PL, FT, BARSET, NASC and MAG. Other commands in the original layout are not translated.

Can I use the ZPL on any printer?

ZPL is the language of Zebra printers and compatible models. For other brands, check the documentation for ZPL support.

Advertisement

Other free tools

Privacy PolicyTerms of UseAboutContactDarkBoxKit