ZPL Viewer Online
Render Zebra ZPL II label code to PNG or a multi-page PDF at 6 / 8 / 12 / 24 dpmm: text with Vietnamese, boxes, Code 128, EAN-13, Code 39, QR, ^GF images.
Result
Press “Run” to see the result.
Send ZPL (one or many ^XA … ^XZ labels) with the printer density dpmm (6, 8 = 203 dpi default, 12 = 300 dpi, 24) and the label size in inches (width 4, height 6 by default; ^PW / ^LL in the code win when smaller), and get a PNG per label (JSON), one label as PNG (format=png, index), or all labels as a PDF whose pages have the real label size (format=pdf), ready for a laser printer or a PDF viewer.
Supported commands: ^FO ^FT ^LH ^PW ^LL ^LR ^A / ^CF (font 0 scalable, bitmap fonts A–H, orientations N / R / I / B) ^FW ^FB (wrapping, justification, max lines) ^FD ^FV ^FS ^FH (hex escapes) ^FR (reverse) ^GB (boxes, lines, rounding) ^GC ^GE ^GD ^GF (ASCII hex, with ZPL compression) ^BY ^BC (Code 128) ^B3 (Code 39) ^BE (EAN-13) ^BQ (QR) ^CI28 (UTF-8: Vietnamese prints) ^PQ ^FX. Unsupported commands are listed in warnings (DataMatrix and PDF417 are drawn as placeholders).
Fonts are open substitutes (Be Vietnam Pro for font 0, JetBrains Mono for the bitmap fonts), so text widths differ slightly from a Zebra printer; positions, boxes and barcodes are exact dots. Up to 50 labels per request.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/zpl-render" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"zpl":"^XA\n^FO40,40^A0N,40,40^FDXin chào^FS\n^FO40,100^BY2^BCN,80,Y,N,N^FD12345678^FS\n^XZ","width":2,"height":1}'const res = await fetch('https://apibox.io.vn/v1/zpl-render', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"zpl": "^XA\n^FO40,40^A0N,40,40^FDXin chào^FS\n^FO40,100^BY2^BCN,80,Y,N,N^FD12345678^FS\n^XZ",
"width": 2,
"height": 1
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/zpl-render",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"zpl": "^XA\n^FO40,40^A0N,40,40^FDXin chào^FS\n^FO40,100^BY2^BCN,80,Y,N,N^FD12345678^FS\n^XZ", "width": 2, "height": 1},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/zpl-render');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"zpl":"^XA\\n^FO40,40^A0N,40,40^FDXin chào^FS\\n^FO40,100^BY2^BCN,80,Y,N,N^FD12345678^FS\\n^XZ","width":2,"height":1}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Is the output pixel-identical to a Zebra printer?
Boxes, positions and barcodes are; text uses open fonts with similar metrics, so line breaks can differ slightly.
Does it print Vietnamese?
Yes, with ^CI28 (UTF-8) the text is drawn with a full Vietnamese font. Real printers need a Unicode font loaded for the same result.
Which barcodes are supported?
Code 128, Code 39, EAN-13 and QR. Other symbologies are reported in warnings and drawn as an empty box.