ZPL tools API
api.zplcloud.com: render, lint and analyse ZPL, convert PDF, images, HTML, SVG, EPL2, DPL and TSPL to ZPL, print ZPL in 11 other printer languages, generate barcodes, QR and GS1 codes, check barcodes and convert units.
Overview
- JSON body in camelCase. API key via
X-API-Keyor Basic Auth; auth, errors and request IDs are described on the API overview. - Same logic as the website tools under
/en/tools/{slug}, but no rate limits and larger input limits. Responses and error messages are always English. - Binary inputs (PDF, PNG, other images) are base64 strings; data URIs such as
data:image/png;base64,…are accepted. dpiis 152, 203, 300 or 600 (default 203) for every tool except the dpi calculator and the printer-language tools, which accept the resolutions of their print heads.- Errors:
{ "error": "…", "tool": "<slug>", "requestId": "…" }, usually 400; 413 for oversized input. - Webhook: every tool accepts
webhookIdandwebhookResult. Eventapi.tool.completed,summary.toolis the slug plus tool-specific values; withwebhookResult=truefiles come as base64, SVG as UTF-8 text and JSON responses as JSON (payload).
| Tool | Input | Response | Renders |
|---|---|---|---|
zpl-to-pdf | ZPL | application/pdf | 1 per label |
zpl-to-png | ZPL | image/png | 1 |
zpl-to-jpg | ZPL | image/jpeg | 1 |
zpl-to-svg | ZPL | image/svg+xml | 1 |
zpl-linter | ZPL | JSON issues | 1 |
zpl-analyser | ZPL | JSON analysis | 1 |
zpl-dpi-converter | ZPL | JSON zpl + engine check | 1 |
check-barcode | photo/scan or data | JSON findings | 1 |
html-to-zpl | PNG of the HTML | JSON zpl | 1 |
pdf-to-zpl | JSON zpl | 1 per page | |
image-to-zpl | PNG, JPG, GIF, BMP | JSON zpl, grf | 1 |
svg-to-zpl | SVG markup | JSON zpl | 1 |
epl2-to-zpl | EPL2 code | JSON zpl | 1 |
dpl-to-zpl | DPL code | JSON zpl | 1 |
tspl-to-zpl | TSPL code | JSON zpl | 1 |
zpl-to-tspl | ZPL | raw print job | 1 per label |
zpl-to-epl2 | ZPL | raw print job | 1 per label |
zpl-to-dpl | ZPL | raw print job | 1 per label |
zpl-to-sbpl | ZPL | raw print job | 1 per label |
zpl-to-cpcl | ZPL | raw print job | 1 per label |
zpl-to-escpos | ZPL | raw print job | 1 per label |
zpl-to-brother | ZPL | raw print job | 1 per label |
zpl-to-pcl | ZPL | raw print job | 1 per label |
zpl-to-easyplug | ZPL | raw print job | 1 per label |
zpl-to-tpcl | ZPL | raw print job | 1 per label |
zpl-to-jscript | ZPL | raw print job | 1 per label |
barcode-to-zpl | symbology + data | JSON zpl | 1 |
qr-code-to-zpl | QR type + fields | JSON zpl | 1 |
gs1-ai-128-to-zpl | GS1 AIs | JSON zpl | 1 |
gs1-ai-datamatrix-to-zpl | GS1 AIs | JSON zpl | 1 |
gs1-ai-qr-code-to-zpl | GS1 AIs | JSON zpl | 1 |
gs1-ai-databar-to-zpl | GS1 AIs | JSON zpl | 1 |
dpi-calculator | values | JSON conversions | 1 |
Sending files - ZPL or code as a JSON string, binary files as base64:
Render counting
The tools are never blocked by the monthly label quota (no 429), but every successful call counts as a render in the account's usage and the dashboard API statistics:
| Tool | Renders |
|---|---|
zpl-to-pdf | one per label (^XA…^XZ block) |
pdf-to-zpl | one per converted page |
zpl-to-tspl, zpl-to-epl2 … (printer languages) | one per label |
| all other tools | one per call |
| failed calls (HTTP 400 and above) | none |
Plans and counting: API overview → quota.
Input limits
Protection against overload, independent of the plan:
| Input | Limit |
|---|---|
| ZPL, EPL2/DPL/TSPL code, SVG | 2,000,000 characters (413) |
| Images (PNG, JPG, GIF, BMP) | 20 MB (413) and 16 megapixels |
| 50 MB (413), 100 pages per call | |
| Label size | 400 × 400 mm |
| ZPL to printer languages | 1,000 labels and 256 MB of uncompressed image data per call |
| Request body | about 4 MB for text tools; 72 MB for html-to-zpl, pdf-to-zpl, image-to-zpl and check-barcode |
| Barcode data | 128 characters (linear), 4,096 (QRCode, DataMatrix, Pdf417, AztecCode, MaxiCode); GS1 AI string 4,096 |
| QR field value / check-barcode data | 2,000 characters each |
From ZPL
ZPL to PDF
POST /v1/tools/zpl-to-pdf · website tool. Renders raw ZPL to a PDF: one page per ^XA…^XZ label, or labels at original size on A4/Letter sheets for office printers.
| Field | Type | Default | Notes |
|---|---|---|---|
zpl | string | required | One or more labels, max 2,000,000 characters. |
dpi | int | 203 | 152, 203, 300 or 600. |
widthMm | number | ^PW, else 75 | Label width in mm, max 400. |
heightMm | number | ^LL, else 50 | Label height in mm, max 400. |
layout | string | label | label: one page per label in label size. a4 / letter: labels at original size on sheets, max 2,000 labels. |
cutLines | bool | true | Sheet layouts only: thin dashed cut lines around every label. |
Response: application/pdf (label.pdf). Renders: one per label. Summary: { tool, widthMm, heightMm, dpi, labels, bytes }. Errors: zpl is required., dpi must be 152, 203, 300 or 600., Label size must not exceed 400 × 400 mm., Rendering produced no PDF - check the ZPL., layout must be "label", "a4" or "letter"., A … mm label does not fit on an A4 sheet - use layout "label"., 413 zpl is too long … or Too many labels for a sheet PDF (max 2,000).
ZPL to PNG
POST /v1/tools/zpl-to-png · website tool. Renders one label as PNG - by default the first one. Fields, size rules and errors as for zpl-to-pdf, plus labelIndex (int, 0-based, default 0) to pick a label in multi-label ZPL. The response header X-ZplCloud-Label-Count returns how many labels the ZPL contains; an index out of range is answered with 400.
Response: image/png. Renders: 1. Summary: { tool, widthMm, heightMm, dpi, labels: 1, bytes }.
ZPL to JPG
POST /v1/tools/zpl-to-jpg · website tool. Renders one label as JPEG. Fields and errors as for zpl-to-png, including labelIndex and X-ZplCloud-Label-Count.
Response: image/jpeg. Renders: 1.
ZPL to SVG
POST /v1/tools/zpl-to-svg · website tool. Renders ZPL as vector SVG. Only zpl is needed; dpi, widthMm and heightMm are validated like for zpl-to-pdf but do not change the SVG.
Response: image/svg+xml; charset=utf-8 (in the webhook result as utf-8 text). Renders: 1. Errors: as zpl-to-pdf, plus Rendering produced no SVG - check the ZPL.
Verify
ZPL DPI converter and rotation
POST /v1/tools/zpl-dpi-converter · website tool. Converts ZPL written for one printer resolution to another and/or rotates the whole label clockwise. Positions, label size, fonts, barcode heights and module widths, boxes, text blocks and ^GFA graphics are recalculated; for rotation the rendered size of every field is measured, so the rotated field lands exactly where it belongs. Afterwards the rendering engine compares every element with its expected position and size.
| Field | Type | Default | Notes |
|---|---|---|---|
zpl | string | required | One or more labels, max 2,000,000 characters. |
sourceDpi | int | 203 | Resolution the ZPL was written for: 152, 203, 300 or 600. |
targetDpi | int | sourceDpi | Resolution of the target printer: 152, 203, 300 or 600. |
rotation | int | 0 | Clockwise: 0, 90, 180 or 270. 90 and 270 swap width and height. |
widthMm, heightMm | number | ^PW / ^LL, else 75 × 50 | Label size in mm (at sourceDpi). Needed for an exact rotation if the ZPL has no ^PW / ^LL. |
check.passed is true when no element deviates by more than toleranceMm (0.3 mm). Deviations are measured in dots of the target printer; typical causes are module widths and font sizes that can only be whole dots. notes[].code: SIZE, MODULE, QR_MAG, DM_MODULE, AZTEC_MAG, GRAPHIC_SCALE, GRAPHIC_ROTATE, STORED_SCALE, STORED_ROTATE, UNITS, MAXICODE, QR, UNVERIFIED. Renders: 1. Summary: { tool, sourceDpi, targetDpi, rotation, passed, maxDeviationMm }. Errors: zpl is required., sourceDpi and targetDpi must be 152, 203, 300 or 600., rotation must be 0, 90, 180 or 270., Nothing to do: set a different targetDpi or a rotation., 413.
ZPL linter
POST /v1/tools/zpl-linter · website tool. Checks ZPL for syntax errors, fields outside the label, fonts, barcodes and printer pitfalls.
| Field | Type | Default | Notes |
|---|---|---|---|
zpl | string | required | Max 2,000,000 characters. |
dpi | int | - | Optional: 152, 203, 300 or 600 for resolution-dependent checks. |
widthMm, heightMm | number | - | Optional label size for the bounds checks. |
profile | string | - | Optional rule set: amazon-fba adds Amazon FBA label checks (e.g. FNSKU format). |
clean is true when there are no errors and no warnings (infos are allowed). severity: error, warning or info. Renders: 1. Summary: { tool, clean, errorCount, warningCount, infoCount }. Errors: zpl is required., dpi must be 152, 203, 300 or 600., Unknown profile. Known profiles: amazon-fba., 413.
ZPL analyser
POST /v1/tools/zpl-analyser · website tool. Explains every command, measures the label and predicts print, network and rendering times.
| Field | Type | Default | Notes |
|---|---|---|---|
zpl | string | required | Max 2,000,000 characters. |
dpi | int | - | Optional: 152, 203, 300 or 600. |
widthMm, heightMm | number | - | Fallback size when the ZPL has no ^PW / ^LL. |
networkMbit | int | 10 | Line speed for the transfer prediction, 1 to 100,000 Mbit/s. |
| Response field | Content |
|---|---|
commands[] | { code, params, description, count } per command |
logs[] | Step-by-step sequence { time, code, params, details } |
labelWidthMm, labelHeightMm, dpi | Detected label size and resolution |
zplBytes, zplChars, commandCount | Size figures |
printSpeedIps, darkness | From ^PR / ^MD, otherwise the Zebra defaults 5 ips and 15 |
timePerLabel | Estimated print time per label (text) |
predictions[] | { count, print, network, render, networkMb, cloud } for 10, 1,000 and 10,000 labels |
assumed | Assumptions behind the prediction: printSpeedIps, speedFromZpl, labelLengthInch, lengthFromZpl, feedSeconds, networkMbit, renderBaseMs, renderKbPerSec |
Renders: 1. Summary: { tool, labelWidthMm, labelHeightMm, dpi, commandCount, timePerLabel }. Errors: zpl is required., dpi must be 152, 203, 300 or 600., networkMbit must be between 1 and 100000., 413.
Check barcode
POST /v1/tools/check-barcode · website tool. Decodes every barcode in a photo or scan - or takes the raw content - and checks GS1 structure, check digits, dates and lengths.
| Field | Type | Default | Notes |
|---|---|---|---|
imageBase64 | string | - | Photo or scan (PNG, JPG, GIF, BMP, WebP), max 20 MB and 16 megapixels. Takes precedence over data. |
data | string | - | Alternatively the barcode content, max 2,000 characters, e.g. in bracket notation. |
source:imageortext;symbologyis the detected format for images (e.g.Code 128 / GS1-128),nullfordata.kind:gs1,digitallink,numberorplain. Control characters inrawappear as<GS>,<RS>,<EOT>.validper code isnullfor plain content; the top-levelvalidisfalseas soon as one code is invalid. Finding codes as for the GS1 tools.
Renders: 1 per call. Summary: { tool, count, valid }. Errors: 400 Send imageBase64 (photo or scan) or data (the barcode content)., imageBase64 is not valid base64., not an image, too many pixels; 413 image too large; 422 No barcode found in the image.
To ZPL
HTML to ZPL
POST /v1/tools/html-to-zpl · website tool. Turns an HTML label into monochrome ZPL graphics. The API does not render HTML itself: render the page to PNG first (e.g. a headless-browser screenshot) and send the PNG. It is converted pixel by pixel without cropping, so render it at printer resolution - widthMm / 25.4 × dpi pixels wide (100 × 50 mm at 203 dpi = 799 × 400 px).
| Field | Type | Default | Notes |
|---|---|---|---|
pngBase64 | string | required | The rendered HTML label as PNG, max 20 MB. |
widthMm, heightMm | number | required | Label size in mm, max 400. |
dpi | int | 203 | 152, 203, 300 or 600. |
thresholdLow | int | 60 | Black threshold; together with thresholdHigh it defines the dither band. |
thresholdHigh | int | 40 | Equal values give a hard black/white cut without dithering. |
compress | bool | true | Compress the ^GFA hex data. |
Response: { zpl, widthPx, heightPx, dpi, widthMm, heightMm, zplBytes }. Renders: 1. Errors: pngBase64 is required …, widthMm and heightMm are required., dpi must be 152, 203, 300 or 600., size over 400 mm; 413 PNG too large.
PDF to ZPL
POST /v1/tools/pdf-to-zpl · website tool. Converts PDF pages (shipping labels, delivery notes) into ^GFA graphics ZPL, one label per page.
| Field | Type | Default | Notes |
|---|---|---|---|
pdfBase64 | string | required | PDF document, max 50 MB. |
pages | string | "1" | 1, 1-3,5 or all; max 100 pages per call. |
widthMm, heightMm | number | PDF page size | Label size in mm (max 400). Without them the size of the first PDF page is used. |
usePdfSize | bool | false | true ignores widthMm/heightMm and uses the PDF page size. |
rotate | int | 0 | 0, 90, 180 or 270. |
scale | string | contain | contain, cover, fill, fitToWidth or fitToHeight. |
darkness | int | 15 | 0 to 30, written as ^MD. |
speed | int | 2 | 2 to 12, written as ^PR. |
dpi | int | 203 | 152, 203, 300 or 600. |
offsetXmm, offsetYmm | number | - | Offset in mm (0 or more). |
zplOffset | bool | true | Apply the offset as ^FO in the ZPL instead of shifting the bitmap. |
Response: { zpl, pageCount, widthMm, heightMm, widthPx, heightPx, dpi, zplBytes }. Renders: one per page (pageCount). Errors: pdfBase64 is required., pdfBase64 is not a PDF document., pages must look like "1", "1-3,5" or "all"., Too many pages (max 100 per call)., range errors for rotate, scale, darkness, speed; 413 PDF too large.
Image to ZPL
POST /v1/tools/image-to-zpl · website tool. Converts a logo or picture into ZPL: inline as ^GFA and as a ~DG download command that stores it on the printer. Transparency becomes white, the white border is cropped.
| Field | Type | Default | Notes |
|---|---|---|---|
imageBase64 | string | required | PNG, JPG, GIF or BMP, max 20 MB and 16 megapixels. |
blackness | int | 50 | Black threshold in percent, 0 to 100. |
rotate | int | 0 | 0, 90 (counter-clockwise), 180 or 270 (clockwise). |
flipH, flipV | bool | false | Mirror horizontally / vertically (before rotating). |
compress | bool | true | Compress the hex data. |
dpi | int | 203 | Only used for the mm size in the response. |
fileName | string | LOGO | GRF name, up to 40 letters, digits, _ or -; .GRF is appended. |
Response: { zpl, grf, grfName, widthPx, heightPx, widthMm, heightMm, dpi, zplBytes }. Renders: 1. Errors: imageBase64 is required (PNG, JPG, GIF or BMP)., not an image, too many pixels, rotate must be 0, 90, 180 or 270., fileName may contain up to 40 letters, digits, _ or -.; 413 image too large.
SVG to ZPL
POST /v1/tools/svg-to-zpl · website tool. Rasterises SVG markup at the printer resolution and returns a complete label with the graphic at 0,0.
| Field | Type | Default | Notes |
|---|---|---|---|
svg | string | required | SVG markup, max 2,000,000 characters. |
sizeMm | number | required | Length of the longer side in mm, max 400. |
dpi | int | 203 | 152, 203, 300 or 600. |
Response: { zpl, widthPx, heightPx, dpi, zplBytes }, zpl = ^XA^FO0,0^GFA…^FS^XZ. Renders: 1. Errors: svg is required., sizeMm is required (size of the longer side in mm)., The SVG could not be converted.; 413.
EPL2 to ZPL
POST /v1/tools/epl2-to-zpl · website tool. Converts Zebra EPL2 printer code to ZPL II.
| Field | Type | Default | Notes |
|---|---|---|---|
code | string | required | Printer code, max 2,000,000 characters. |
Response: { zpl, labels, zplBytes }. Renders: 1 per call, regardless of labels. Errors: code is required., The code could not be converted.; 413.
DPL to ZPL
POST /v1/tools/dpl-to-zpl · website tool. Converts Datamax / Honeywell DPL code to ZPL II. Field code, response and errors as for epl2-to-zpl.
TSPL to ZPL
POST /v1/tools/tspl-to-zpl · website tool. Converts TSC TSPL / TSPL2 code to ZPL II. Field code, response and errors as for epl2-to-zpl.
ZPL to other printer languages
Print ZPL on printers that do not speak ZPL. Every ^XA…^XZ label is rendered dot for dot at the printer resolution - without anti-aliasing, like a thermal print head - and written as a monochrome bitmap in the target language. Fonts, barcodes and emulation differences no longer matter: the printer only prints dots. The response is the raw print job; send it unchanged to TCP port 9100.
| Field | Type | Default | Notes |
|---|---|---|---|
zpl | string | required | One or more labels, max 2,000,000 characters. Each label (including ^PQ copies) becomes one label in the job. |
dpi | int | per language | Resolution of the target print head, allowed values per language below. Brother: set by model. |
widthMm | number | ^PW, else 75 | Label width in mm, max 400. |
heightMm | number | ^LL, else 50 | Label height in mm, max 400. |
compress | bool | false | Use the compressed image format of the language (400 if it has none). |
hex | bool | false | SBPL and CPCL: image data as hex text instead of binary. |
cut | bool | true | ESC/POS and Brother: cut after each label. |
paper | string | a4 | PCL: a4 or letter. |
model | string | ql-820 | Brother: model family, see zpl-to-brother. |
media | string | continuous | Brother QL and TD-4: continuous or diecut. |
Response application/octet-stream with Content-Disposition: attachment; filename=label.<ext> and the header X-ZplCloud-Label-Count. Every label counts as a render. Limits: 1,000 labels and 256 MB of uncompressed image data per call (413). Errors as for the other tools, e.g. dpi must be 203, 300, 600 for TSPL.
| Tool | Printers | dpi | Image command | compress |
|---|---|---|---|---|
zpl-to-tspl | TSC, Printronix T-series | 203, 300, 600 | BITMAP | PCX via DOWNLOAD + PUTPCX |
zpl-to-epl2 | Zebra EPL (LP/TLP 2844 …) | 203, 300 | GW | - |
zpl-to-dpl | Honeywell, Datamax-O'Neil | 203, 300, 600 | <STX>I PCX + Y field | always PCX |
zpl-to-sbpl | SATO | 203, 300, 600 | ESC GB / ESC GH | PCX via ESC GP |
zpl-to-cpcl | Zebra and Honeywell mobile | 203 | CG / EG | PCX via PCX |
zpl-to-escpos | Epson TM, Star, Bixolon, Citizen | 180, 203 | GS v 0 | - |
zpl-to-brother | Brother QL, TD-4, PT | by model | raster lines g / G | TIFF PackBits |
zpl-to-pcl | HP LaserJet, PCL 5 lasers | 300, 600 | ESC*b#W | TIFF PackBits (mode 2) |
zpl-to-easyplug | Avery Dennison, Novexx | 203, 300, 600 | #YIB | RLE via #YIR |
zpl-to-tpcl | Toshiba Tec | 203, 300, 600 | {SG;…,1,…|} | TOPIX ({SG;…,3,…|}) |
zpl-to-jscript | cab | 203, 300, 600 | d BMP + I field | PCX via d PCX |
Printing the job
The job contains binary image data: it has to reach the printer byte for byte - no text encoding, no appended line break. Four ways:
| Way | How | Notes |
|---|---|---|
| Directly to TCP 9100 | nc -q 1 192.168.1.50 9100 < label.tspl | Any socket client that sends bytes unchanged. |
| zplCloud CLI | zplcloud send --target 192.168.1.50 --file label.tsplzplcloud send --usb --file label.binzplcloud send --target 192.168.1.50 --file label.zpl --language tspl | TCP or USB. The job extensions are sent byte-exact automatically; --language converts through this API first. From CLI v1.2.26 - see CLI docs. |
POST /v1/remote-printers/{id}/raw | { "base64": "…", "fileName": "label.tspl" } or { "zpl": "^XA…", "language": "tspl", "dpi": 203 } | Through the zplCloud CLI agent in the printer's network - no inbound ports. With zpl + language the cloud converts first (same fields as above, renders counted per label). Agent v1.2.22+ for TCP printers, v1.2.26+ for USB printers. |
POST /v1/print/folder | { "agent", "folder", "zpl", "language": "tspl" } or { "agent", "folder", "base64", "fileName": "label.tspl" } | Stores the job with its extension in an agent watch folder; the agent prints oldest-first. The folder's pattern must include the extension. Agent v1.2.26+. |
ok is false with an error when the agent could not deliver the job (printer unreachable, outdated agent); 409 when no agent is online. A watch folder can also convert by itself: "convert": { "language": "tspl" } in the agent config turns every ZPL file into TSPL before printing - see watch folders.
The jobs follow the manufacturers' programming manuals and are checked by decoding them back to the bitmap. Firmware differs between models - print one test label before rolling a language out.
ZPL to TSPL
POST /v1/tools/zpl-to-tspl · website tool. SIZE in mm (TSC's 8/12/24 dots per mm, so older firmware without SIZE … dot gets the exact dot count), CLS, BITMAP 0,0,<bytes>,<height>,0,<data> with 0 = black, PRINT 1,1. GAP, BLINE and DIRECTION are not sent - the printer keeps its calibration. With compress the label goes to RAM as a 1-bit PCX (DOWNLOAD), is printed with PUTPCX and deleted with KILL.
ZPL to EPL2
POST /v1/tools/zpl-to-epl2 · website tool. Per label N, q<width>, GW0,0,<bytes>,<height>,<data> (0 = black) and P1, lines end with LF. No compression: EPL2 stores PCX graphics only in flash (GM), which would wear it out label by label.
ZPL to DPL
POST /v1/tools/zpl-to-dpl · website tool. <SOH>D (switches off immediate commands on older Datamax printers), then per label <STX>IDPZPLCLOUD with the label as a 1-bit PCX into RAM (module D), a label format <STX>L, D11, 1Y1100000000000ZPLCLOUD, Q0001, E and <STX>xDGZPLCLOUD to delete it. DPL always uses the compressed PCX path.
ZPL to SBPL
POST /v1/tools/zpl-to-sbpl · website tool. <ESC>A<ESC>A1 with the label size, then per label <ESC>A, <ESC>V0001<ESC>H0001, <ESC>GB (binary) or <ESC>GH (hex) with bytes per row and 8-dot blocks - the bitmap is padded to multiples of 8 dots, 1 = black -, <ESC>Q1<ESC>Z. With compress: <ESC>GP with a PCX, as long as it fits the 5-digit size field (99,999 bytes); larger labels fall back to GB.
ZPL to CPCL
POST /v1/tools/zpl-to-cpcl · website tool. Per label ! 0 200 200 <height> 1, PAGE-WIDTH, then bands of up to 128 non-blank rows as CG (binary) or EG (hex), 1 = black - blank rows cost nothing -, FORM and PRINT. With compress: PCX 0 0 followed by the label as a 1-bit PCX. For continuous receipt paper remove FORM.
ZPL to ESC/POS
POST /v1/tools/zpl-to-escpos · website tool. ESC @, ESC a 0, the label as GS v 0 raster bands of 256 rows (small bands keep the receive buffer of mobile models free), then GS V 66 0 (feed and cut) when cut is true. dpi 203 for most 80 mm printers (576 dots print width), 180 for the Epson TM-T88 series (512 dots).
ZPL to Brother raster
POST /v1/tools/zpl-to-brother · website tool. Brother raster mode: invalidate bytes, ESC @, per label ESC i a 01, ESC i z, ESC i M/A/K (cut), ESC i d (feed), M 02 with compress, one raster line per dot row across the full head width - mirrored, as the printer expects - and 0x0C between labels, 0x1A at the end. The label is centred on the narrowest media width of the model that fits it, using the margins from Brother's command reference. The model sets the dpi:
| model | Printers | dpi | Head | TIFF |
|---|---|---|---|---|
ql-820 | QL-580N, QL-710W, QL-720NW, QL-810W, QL-820NWB | 300 | 720 dots | yes |
ql-800 | QL-570, QL-700, QL-800 | 300 | 720 dots | no |
ql-1100 | QL-1050, QL-1060N, QL-1100, QL-1110NWB, QL-1115NWB | 300 | 1296 dots | yes |
td-4-203 | TD-4210D, TD-4410D, TD-4420DN | 203 | 832 dots | yes |
td-4-300 | TD-4510D, TD-4520DN, TD-4550DNWB | 300 | 1280 dots | yes |
pt-p750w | PT-E550W, PT-P750W, PT-P710BT (tape up to 24 mm) | 180 | 128 dots | yes |
pt-p900 | PT-P900, PT-P900W, PT-P950NW, PT-P910BT (tape up to 36 mm) | 360 | 560 dots | yes |
media: continuous (the label length comes from the job) or diecut (the label size must match the loaded labels). P-touch tapes are always continuous and print across the tape: the label width is the printable tape width.
ZPL to PCL
POST /v1/tools/zpl-to-pcl · website tool. PJL ENTER LANGUAGE = PCL, ESC E, paper size (paper), portrait, top margin 0, unit and raster resolution = dpi; one page per label with the label at its original size 10 mm from the top left corner, rows as ESC*b#W (trailing zero bytes dropped, compress = mode 2 TIFF PackBits), blank rows as ESC*b#Y, ESC*rB and a form feed. 400 if the label does not fit the paper with a 10 mm margin.
ZPL to Easy Plug
POST /v1/tools/zpl-to-easyplug · website tool. Per label #!A1, #IMSR<width>/<length> in mm, #ERN, #T0#J0, the bitmap with #YIB<rows>/<bytes per row>/<data> (1 = black, bottom row first) and #Q1/. With compress: #YIR run-length data (pairs of white and black run lengths, identical rows with FF nn), which shrinks typical labels by about 90 %. Printers with 12 dots/mm have 305 dpi - render at 300.
ZPL to TPCL
POST /v1/tools/zpl-to-tpcl · website tool. {D<pitch>,<width>,<length>|} in 0.1 mm (pitch = length + 3 mm gap), then per label {C|}, {SG;0000,0000,<width>,<height>,1,<data>|} (1 = black) and {XS;I,0001,0002C3000|} (transmissive sensor, batch mode, no ribbon - use …C3020 for thermal transfer). With compress: graphic type 3, Toshiba's TOPIX compression, in blocks below 64 KB with the start row in dots.
ZPL to JScript
POST /v1/tools/zpl-to-jscript · website tool. Per label d BMP;ZPLCLOUD uploads the label as a 1-bit BMP to RAM (transfer between ESC . and ESC ., every ESC in the data doubled), then m m, J, S l1;0,0,<height>,<height + 3>,<width> (gap labels), I 0,0,0;ZPLCLOUD and A 1. With compress the image is a PCX (d PCX).
Barcodes & GS1
Barcode to ZPL
POST /v1/tools/barcode-to-zpl · website tool. Generates a label with one barcode, placed with a 5 mm margin.
| Field | Type | Default | Notes |
|---|---|---|---|
symbology | string | Code128 | Name from the table below (not case-sensitive). |
data | string | required | Content; max 128 characters for linear codes, 4,096 for QRCode, DataMatrix, Pdf417, AztecCode and MaxiCode. |
dpi | int | 203 | 152, 203, 300 or 600. |
widthMm, heightMm | number | preset | Label size in mm (max 400); default is the preset of the symbology. |
invert | bool | false | White code on black label (^LRY). |
| Symbology | Preset (mm) | Data rule |
|---|---|---|
Code128 | 56 × 28 | - |
Code39 | 56 × 28 | - |
Code93 | 46 × 28 | - |
Code11 | 56 × 28 | digits only |
Codabar | 46 × 28 | digits and A-D |
Msi | 40 × 28 | digits only |
Plessey | 38 × 28 | digits only |
Industrial2of5 | 53 × 28 | digits only |
Interleaved2of5 | 54 × 28 | digits only, even count |
Telepen | 40 × 28 | - |
Pzn | 34 × 28 | 6 to 8 digits |
Ean13 | 44 × 30 | 12 or 13 digits |
Ean8 | 42 × 30 | 7 or 8 digits |
UpcA | 44 × 30 | 11 or 12 digits |
UpcE | 48 × 30 | 6 to 8 digits |
Isbn | 53 × 30 | 10 or 13 digits |
EanUpcAddOn2, EanUpcAddOn5 | 50 × 24 | - |
Ean128 (GS1-128) | 66 × 28 | - |
UccEan128 | 50 × 24 | - |
GS1DataBarExpanded | 34 × 28 | - |
GS1DataBarExpandedStacked | 50 × 24 | - |
Postnet | 52 × 22 | digits only |
Planet | 60 × 22 | digits only |
QRCode | 36 × 36 | - |
DataMatrix | 29 × 29 | - |
AztecCode | 28 × 28 | - |
MaxiCode | 38 × 38 | - |
Pdf417 | 50 × 34 | - |
MicroPdf417 | 30 × 34 | - |
CompactPdf417 | 38 × 30 | - |
CodablockF | 116 × 34 | digits only |
Code16k | 69 × 30 | - |
Code49 | 74 × 30 | digits only |
Renders: 1. Summary: { tool, symbology, widthMm, heightMm, dpi, zplBytes }. Errors: Unknown symbology. Known: …, data is required., data rule violations, data too long, Label size must not exceed 400 × 400 mm.
QR code to ZPL
POST /v1/tools/qr-code-to-zpl · website tool. Builds the QR content for a type from its fields and returns a square label.
| Field | Type | Default | Notes |
|---|---|---|---|
type | string | url | QR type from the table below. |
fields | object | - | Field values as strings (keys not case-sensitive), max 2,000 characters each. |
sizeMm | number | 25 | Edge length of the square label, 1 to 400 mm. |
dpi | int | 203 | 152, 203, 300 or 600. |
mode | string | native | native (^BQ command) or image (^GFA bitmap). |
errorCorrection | string | - | L, M, Q or H (native mode). |
magnification | int | - | 1 to 10 (native mode). |
| type | fields | Encoded content |
|---|---|---|
url | url | the URL |
text | text | the text |
wifi | ssid (required), password, security (WPA default, WEP, nopass), hidden (true/1/on) | WIFI:T:WPA;S:…;P:…;; |
email | to, subject, body | mailto:…?subject=…&body=… |
phone | phone | tel:… |
whatsapp | phone, message | https://wa.me/<digits>?text=… |
signal | phone | https://signal.me/#p/<phone> |
telegram | username, message | https://t.me/<username>?text=… |
location | lat, lng | geo:lat,lng |
vcard | name, phone, email, org | vCard 3.0 |
instagram | username | https://instagram.com/<username> |
tiktok | username | https://www.tiktok.com/@<username> |
snapchat | username | https://snapchat.com/add/<username> |
facebook | url (page path) | https://facebook.com/<url> |
Renders: 1. Summary: { tool, type, mode, sizeMm, dpi, zplBytes }. Errors: Unknown type. Known: …, The fields for this QR type are empty. Required fields: …, sizeMm must be between 1 and 400., mode must be native or image., errorCorrection must be L, M, Q or H., magnification must be between 1 and 10., field or content too long.
GS1-128 from application identifiers
POST /v1/tools/gs1-ai-128-to-zpl · website tool. Validates GS1 application identifiers in bracket notation and generates a GS1-128 barcode. The four GS1 tools share fields, validation and errors:
| Field | Type | Default | Notes |
|---|---|---|---|
ai | string | required | AIs in bracket notation, e.g. (01)04006381333931(17)271231(10)L-2026-0417; max 4,096 characters. |
dpi | int | 203 | 152, 203, 300 or 600. |
widthMm | number | auto / preset | GS1-128 and DataBar: wide enough for the content, at least the preset (66 mm / 34 mm). 2D: preset. |
heightMm | number | preset | Stacked DataBar: calculated from rows and text lines. |
domain | string | id.gs1.org | Only gs1-ai-qr-code-to-zpl: Digital Link domain. |
variant | string | single | Only gs1-ai-databar-to-zpl: stacked for the two-row form. |
Every AI is checked against the GS1 catalogue: unknown AIs, duplicates, digits-only and character set 82, fixed and maximum lengths, month and day of dates, check digits. With any issue nothing is generated and the response is 400 (the error text joins the first four messages):
Issue codes: unknownAi, duplicate, empty, numeric, charset82, fixedLength, maxLength, month, day, checkDigit. Other errors: ai is required …, no AI found in the string, dpi must be 152, 203, 300 or 600. Renders: 1. Summary: { tool, symbology, widthMm, heightMm, dpi, zplBytes }.
GS1 DataMatrix from application identifiers
POST /v1/tools/gs1-ai-datamatrix-to-zpl · website tool. Same fields and validation as gs1-ai-128-to-zpl; generates a GS1 DataMatrix with FNC1 and GS separators. symbology is DataMatrix, preset 29 × 29 mm; content shows the encoded string with <GS> for the separator.
GS1 QR code (Digital Link) from application identifiers
POST /v1/tools/gs1-ai-qr-code-to-zpl · website tool. Same fields and validation as gs1-ai-128-to-zpl; encodes a GS1 Digital Link URL in a QR code. Optional domain (default id.gs1.org). The AIs need a primary key such as (01) GTIN, otherwise 400. symbology is QRCode, preset 36 × 36 mm; content is the URL.
GS1 DataBar from application identifiers
POST /v1/tools/gs1-ai-databar-to-zpl · website tool. Same fields and validation as gs1-ai-128-to-zpl; generates GS1 DataBar Expanded. "variant": "stacked" (lowercase) produces the two-row form for narrow labels with the text lines set below; any other value gives the single-row form. symbology is GS1DataBarExpanded or GS1DataBarExpandedStacked.
Helpers
DPI calculator
POST /v1/tools/dpi-calculator · website tool. Converts between millimetres, inches, dots and points at a printer resolution. All fields are optional; the response contains only the blocks you asked for, plus a reference table.
| Field | Type | Default | Response block |
|---|---|---|---|
dpi | int | 203 | 72 to 2400; dpi, dotsPerMm, dotsPerInch |
lengthMm or lengthIn | number | - | length { mm, inch, dots } (lengthMm wins) |
dots | number | - | dots { dots, mm, inch } |
labelWidthMm, labelHeightMm | number | - | label { widthMm, heightMm, widthDots, heightDots } |
fontPt | number | - | fontPt { pt, dots } |
fontDots | number | - | fontDots { dots, pt } |
moduleMm | number | - | moduleMm { mm, dots } (barcode module, at least 1 dot) |
moduleDots | number | - | moduleDots { dots, mm } |
Renders: 1. Summary: { tool, dpi }. Errors: dpi must be between 72 and 2400.