Skip to main content
REST API · Cloud & Private Cloud VM

Convert HTML and PDF to Zebra ZPL in one API call

Build thermal shipping and barcode labels with standard HTML, CSS, images, and JavaScript—or convert carrier PDFs—without writing raw ZPL.

No credit card required203, 300 & 600 DPIQuickstart Tutorial →
POST /html2zplapi.htmltozpl.com
{
  "width": 4,
  "height": 6,
  "dpi": 203,
  "html": "<h1>PRIORITY 2-DAY</h1><svg id='barcode'/>"
}
200 OK · text/plain
P
PRIORITY 2-DAY
4×6″ · 203 DPI
SHIP TO: WWW.HTMLTOZPL.COMNEW YORK NY 10001
^XA ^PW812^LL1218^LH0,0 ^FO0,0^GFA,123840,...^FS^XZ
Open in interactive demo →
200+
Companies in production worldwide
50M+
Thermal labels printed since 2018
203 · 300 · 600
Supported Zebra printer DPI resolutions
Cloud & VM
Managed REST API or private VPC deploy
Core Conversion APIs

Three focused endpoints for every label workflow

Whether you build dynamic HTML templates, process carrier PDFs, or preview ZPL in your UI, every endpoint uses the same simple REST interface.

POST /html2zpl

HTML to ZPL

Design Zebra labels using standard HTML, CSS, images, and JavaScript. Generate production-ready ZPL without learning proprietary printer commands.

  • Full CSS layout & absolute units (in, mm)
  • Embedded images, custom fonts & JS barcodes
  • Control DPI, darkness, speed & dithering
POST /pdf2zpl

PDF to ZPL

Convert carrier shipping labels, packing slips, and multi-page PDFs into crisp Zebra ZPL while keeping barcodes and typography razor sharp.

  • Trim whitespace & letterheads before scaling
  • Single-page, page ranges, or all pages
  • Flexible contain, cover, fill & rotation modes
POST /zpl2png

ZPL to PNG

Rasterize ZPL code into clean PNG label previews. Inspect barcodes and layout in CI, archive labels, or display previews in your app without a printer.

  • Instant visual QA without physical hardware
  • Supports plain UTF-8 ZPL or Base64 input
  • Custom dimensions, units & 90°/180°/270° rotation
Developer Experience

Integrate in minutes with standard HTTP

No proprietary SDKs or fragile printer drivers. Send JSON or form-encoded requests with a Bearer API key and receive raw ZPL ready to stream straight to TCP port 9100.

  • Instant trial key: Call POST /v1/trial to get a 25-label, 7-day key with zero signup friction.
  • Machine-readable OpenAPI: Generate typed clients or explore endpoints using our openapi.json.
  • Direct TCP printing: Works with any Zebra-compatible thermal printer over USB, driver, or raw socket.
curl -fsS -X POST https://api.htmltozpl.com/html2zpl \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "width": 4,
    "height": 6,
    "dpi": 203,
    "html": "<div style=\"padding:0.25in;font-family:sans-serif\"><h1>ORDER #4821</h1><p>Priority 2-Day</p></div>"
  }' > label.zpl

# Send raw ZPL directly to a networked Zebra printer
nc -N 192.168.1.234 9100 < label.zpl
POST https://api.htmltozpl.com/html2zplView full example →
Physical 4x6 shipping label printed on a Zebra thermal printer using htmltozpl.com
Real Zebra Thermal Print4×6″ shipping label converted via API
203 DPITCP :9100
Built for Production

Engineered for real warehouse and fulfillment workflows

From single-station shipping desks to high-throughput ERP and WMS pipelines, htmltozpl.com produces dependable ZPL that prints cleanly every time.

Pixel-accurate CSS & barcodes

Position elements with physical units (in, mm), embed custom fonts or Data URLs, and render scannable Code 128 or QR barcodes with JavaScript or SVG.

Fine-grained thermal print controls

Tune printer DPI (203, 300, 600), darkness, media print speed, and image dithering to get crisp, reliable scans on any Zebra thermal printer.

Private VPC Virtual Machines

Need zero external traffic or unlimited volume? Deploy our self-contained VM image inside your own AWS, Azure, or Google Cloud network with zero request logging.

Backed by real engineers & hardware

Maintained by DAB Labs in Canada since 2018. Don't have a printer handy? Send us your label and we'll print a physical test on Zebra hardware and email you a photo.

Ready to print your first label?

Start free with 500 labels per month on the Developer plan, or test HTML, PDF, and ZPL conversions right in your browser.