NinjaFunction (Ninja Function) logo

ZPL Editor

Write, preview, and download ZPL labels for Zebra printers.


Lines: 4Characters: 92✓ Valid ZPL
Preview

No Label to Preview

Enter ZPL code or upload a .zpl file

⏳ Waiting for inputRotation: 0° | DPI: 203 | 102×152mm

About This Tool

Design and preview ZPL (Zebra Programming Language) labels in real-time. Write ZPL code on the left and see the label preview on the right. Download labels as PNG, JPG, PDF, or ZPL files. Supports label templates, rotation, and file upload. Everything runs locally in your browser for maximum privacy.

📝 How to Use

✍️Write ZPL Code

Start by writing or pasting your ZPL code in the left editor panel. You can use the template buttons to get started quickly.

Enter ZPL commands like ^XA, ^FO, ^FD, and ^XZ in the editor.

Use template buttons (Text, Barcode, QR Code, Shipping) for quick examples.

Upload existing .zpl or .txt files using the Upload button.

👁️Preview Your Label

The right panel shows a real-time preview of your label as you type.

The label preview updates automatically after a short delay.

Use the Rotate button to rotate the preview by 90° increments.

The label dimensions are automatically detected from ^PW and ^LL commands.

⬇️Download Your Label

Download your label in multiple formats for printing or sharing.

PNG - Download as high-quality PNG image.

JPG - Download as compressed JPG image.

PDF - Download as PDF document (prints to PDF).

ZPL - Download the ZPL code as a .zpl file.

💡 Pro Tips

  • ✔ Always start your ZPL code with ^XA and end with ^XZ.
  • ✔ Use ^PW to set label width and ^LL to set label length for accurate sizing.
  • ✔ The tool automatically detects label dimensions from your ZPL code.
  • ✔ For complex labels, test with small changes and preview frequently.

Common ZPL Commands

ZPL (Zebra Programming Language) is a text language. Each command starts with a caret (^) and a two-letter code. These are the commands you will use most often:

CommandWhat it does
^XA / ^XZStart and end of a label. Every label must begin with ^XA and finish with ^XZ.
^PW / ^LLSet the print width and label length, measured in dots.
^FOField origin: the position (x, y) where the next item starts.
^AChooses the font and its height and width.
^FD / ^FSField data (the text or barcode value) and field separator that ends the field.
^BCPrints a Code 128 barcode.
^BQPrints a QR code.
^GBDraws a box or a line.

A simple example

This label prints a line of text and a barcode:

^XA
^FO50,50^A0N,50,50^FDHello World^FS
^FO50,150^BCN,100,Y,N,N^FD123456789^FS
^XZ

Label Sizes and Print Resolution

ZPL measures positions and sizes in dots, not inches or millimetres. To convert, multiply the size by your printer's resolution. This editor previews labels at 203 DPI (8 dots per mm), the most common resolution for Zebra printers.

  • A 4 × 6 inch shipping label at 203 DPI is about 812 × 1218 dots, so you would use ^PW812 and ^LL1218.
  • A 2 × 1 inch product label at 203 DPI is about 406 × 203 dots.
  • Printers with 300 or 600 DPI use more dots for the same label size, so check your printer's resolution before copying coordinates between printers.

The preview is a close guide to the final label, but fonts and spacing can look slightly different on a real printer. Do a test print on your own label stock before printing in bulk.

Frequently Asked Questions

What is ZPL?

ZPL (Zebra Programming Language) is the text-based language used to design labels for Zebra and many other thermal printers. Commands describe where to place text, barcodes, lines and images on the label.

Do I need a Zebra printer to use the ZPL Editor?

No. You can write and preview ZPL code without a printer. You only need a printer when you are ready to print the finished label.

Is my label data uploaded to a server?

No. The label preview is drawn in your browser, so your ZPL code and any text, addresses or barcodes in it stay on your device.

How do I set the label size?

Add ^PW for the width and ^LL for the length near the top of your code, both in dots. The editor reads these values and sets the preview size automatically. At 203 DPI, multiply inches by 203 to get dots.

Which formats can I download my label in?

You can download the label as a PNG, JPG or PDF file, or save the code itself as a .zpl file.

Why does my label look different on my printer?

The preview is an approximation. Different printer models use different resolutions and built-in fonts, so spacing and font shapes can vary slightly. Check the printer's DPI, and do a test print before printing a large batch.

Always FreeAll tools are 100% free to use.
No Sign UpNo registration or login required.
Blazing FastInstant results, always.