Skip to content

Supported formats

Every conversion uses one endpoint:

POST https://api.labelzoom.com/api/v2/convert/{source}/to/{target}

The {source} must match the request’s Content-Type, and {target} must be allowed by its Accept header. Send the label code or file bytes as the request body; the response body is the converted result.

Convert from any of these:

Format Content-Type Description
zpl text/plain Zebra Programming Language
epl text/plain Eltron Programming Language
tspl text/plain TSC printer language (TSPL/TSPL2)
dpl text/plain Datamax Printer Language
pdf application/pdf PDF document
png image/png PNG image
jpg / jpeg image/jpeg JPEG image
gif image/gif GIF image
bmp image/bmp Bitmap image
xml application/xml LabelZoom XML (LBXML)
json application/json LabelZoom JSON
url text/plain A URL that points to any format above — see Converting from a URL

epl, tspl, and dpl are source-only — you can convert from them, but not to them. They are newer additions and may not yet appear in the Swagger enum, but the endpoints are live.

Convert to any of these:

Format Content-Type (and Accept)
pdf application/pdf
png image/png
jpg / jpeg image/jpeg
gif image/gif
bmp image/bmp
zpl text/plain
xml application/xml
json application/json

The API is not built for HTML forms — it reads the raw request body, so the headers must line up:

  • The Content-Type must match the source format in the table above, or the request fails with 400.
  • Image and PDF sources also accept text/plain when the body is base64-encoded — useful when your client can’t send raw bytes.
  • If you send an Accept header, it must allow the target’s media type (or */*), or the request fails with 400. Omit Accept to skip that check.

application/x-www-form-urlencoded and multipart/form-data are not supported.

Instead of uploading a file, POST its URL as the body with source url:

Terminal window
curl -X POST "https://api.labelzoom.com/api/v2/convert/url/to/png" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: text/plain" \
-d "https://example.com/label.zpl" \
--output label.png

LabelZoom fetches the document, infers its format from the remote server’s Content-Type, and converts it. The remote response must carry a supported content type.

Any image or PDF source also accepts a base64 body sent as Content-Type: text/plain — handy when your client can’t send raw bytes:

Terminal window
base64 -w0 label.pdf | curl -X POST \
"https://api.labelzoom.com/api/v2/convert/pdf/to/zpl" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: text/plain" \
--data-binary @-

Some paths are available on the free tier (with a watermark); others require a paid plan:

Path Availability
Image or PDF → zpl (e.g. pdf/to/zpl, png/to/zpl) Free (watermarked)
zpl / epl / tspl / dpl → PDF or image Free (watermarked)
Image/PDF ↔ image/PDF (e.g. pdf/to/png, png/to/pdf, pdf/to/gif) Paid
Any → json Paid
Output dialect (e.g. MOCA — see Conversion parameters) Paid

A blocked path returns 403; see Errors.

A single request can carry multiple labels — several ^XA…^XZ blocks, a multi-page PDF, or a data array with more than one entry:

  • PDF and ZPL outputs include every label (as pages / concatenated ZPL).
  • Image (png, bmp, gif, jpeg) and XML outputs return only the first label.
  • On the free tier, only the first label renders normally; the rest are replaced with a watermark label. Multi-page output is a paid feature.