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
ipl text/plain Intermec Printer Language
tspl text/plain TSC printer language (TSPL/TSPL2)
dpl text/plain Datamax Printer Language
sbpl text/plain SATO Barcode 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, ipl, tspl, dpl, and sbpl work in both directions — they are targets as well as sources. 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
jpeg image/jpeg
gif image/gif
bmp image/bmp
zpl text/plain
epl text/plain
ipl text/plain
tspl text/plain
dpl text/plain
sbpl text/plain
xml application/xml
json application/json

url is the one source with no target equivalent — it tells the server to go fetch a document rather than naming an output. jpg is accepted in both directions as an input spelling that normalizes to jpeg.

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. The target’s exact media type, a wildcard subtype (image/*), and */* all work, and a charset or q parameter is ignored. A media type the endpoint cannot produce at all fails with 406; one it can produce but that doesn’t match this target fails with 400. Omit Accept to skip the 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 / ipl / tspl / dpl / sbpl → PDF or image Free (watermarked)
Any → epl / ipl / tspl / dpl / sbpl 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 the printer languages (ZPL, EPL, IPL, TSPL, DPL, SBPL) include every label — as pages for PDF, concatenated for the rest.
  • 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.