How zplviewer.app draws labels on your device
The evidence behind the claims on the ZPL viewer: what draws the label, which fonts stand in for Zebra's, how the pictures were checked, what is not drawn, and how to check that your ZPL stays on your device.
Updated
Open the ZPL viewerWhat happens to your ZPL
The ZPL you type, paste or open stays in the page. A background worker on your device draws it with @zplkit/render 0.2.1, an open-source ZPL II renderer written in TypeScript (MIT license), whose barcodes are drawn by bwip-js. The picture goes to a canvas on the page, and the PNG, PDF and ZIP files are written in your browser. Nothing is sent anywhere, and the page keeps working with no internet connection once it has loaded.
A file is read as UTF-8 text, or as Windows-1252 when it is not UTF-8. Text that is base64 of ZPL is decoded first. The label is drawn again 300 milliseconds after your last key press, in the worker, so a slow label never stops you typing.
How a label is drawn
Positions and sizes follow Zebra's ZPL II Programming Guide. By default the viewer prints whole dots, the way a printer does: a dot is black when its center falls inside a shape. Smooth (for the screen) shades the edges instead, which looks smoother on a screen but is not what the printer prints.
The renderer's authors test each element dot for dot against how Zebra printers draw it, and state that boxes, circles, diagonals, pictures and barcode bars come out as printed. Data Matrix, PDF417 and MicroPDF417 symbols come out the same size as a printer's but may encode the data in another way, which scanners read as the same data; long runs of digits can make a PDF417 symbol one row shorter.
The fonts are open stand-ins
Zebra's fonts are licensed and cannot be copied into a web page, so open-licensed fonts take their place. Font 0 is drawn with Archivo Bold at a condensed width: of 13 open condensed fonts compared dot by dot with pictures of font 0, it matched best. Each character is given font 0's own width and position, measured from those pictures, so a line of text starts and ends where the printer puts it.
Fonts A to H use the letter shapes of DejaVu Sans Mono (bold for font B), set in each font's character cell, gap and baseline from Zebra's guide. The letters therefore take the same space as on a printed label but look slightly different. ZPL fonts lists every font's size.
How the pictures were checked
The engine tests draw 30 test labels written for the purpose: a shipping label and a product label; barcodes from Code 128, Code 39 and Code 93 to EAN, UPC, GS1 DataBar, PDF417, QR, Data Matrix, Aztec, MaxiCode and postal barcodes; text in font 0 and fonts A to H in all four directions; text blocks, reverse printing, boxes, circles, diagonals and ellipses; pictures in hex, compressed and Z64 form; stored pictures and formats; hex escapes and UTF-8 text; a label narrower than the stock with a moved home position; an upside-down label with a copy count; two and ten labels in one file; ZPL with no ^XZ; and unknown commands.
Each test label was also sent once, when the tests were written, to Labelary, a ZPL rendering service whose online viewer sends the ZPL to its web API (api.labelary.com) to draw it. Its pictures of our own test labels are kept as references; no visitor's ZPL is ever sent. The service returned a picture for 29 of the 30 labels, all but the one with no ^XZ, which it does not accept. On November 22, 2026, this viewer's picture matched the reference dot for dot for 13 of the 29, and the largest difference was 0.6245 percent of dots. The references are 812 × 1218 dots for a 4 × 6 in label at 203 dpi, so the tests draw on that grid (101.5 × 152.25 mm at 8 dpmm) with no scaling or alignment. Each label's share of different dots is recorded, and a test fails if a label moves more than 0.5 percentage points further from its reference. Of three ZPL renderers tried, this one was the closest to the references.
What differs: the letters, including the digits under barcodes, because of the stand-in fonts; a UPC-E barcode written with 11 digits, which this viewer and the reference draw as different numbers (with 10 digits they agree); a picture stored with ~DG without a memory letter such as R:, which the reference finds and this viewer does not draw; and ZPL with no ^XZ, which this viewer draws.
Every barcode the test reader can read is read back from this viewer's picture with zxing-wasm, an open-source barcode reader, and must give the data written in the ZPL; the reference picture is read the same way. Some older and postal barcode types the reader cannot read, and those are checked by the dot comparison only. Each PNG is checked with ImageMagick (its size, its bit depth and the density it records) and must match the label dot for dot. Each PDF is checked with pdfinfo (a 4 × 6 in label is a page of 288 × 432 points) and pdfimages (one black-and-white image per page at the label's dots), and drawn again by two other programs, pdftoppm and Ghostscript, to the same dots.
Page tests drive the site in a browser with a script: the sample and three test labels, whose picture on the page must equal the engine's, with a QR code read back from the page; each density, a change of size, rotation, smooth edges and a custom size in inches and millimeters; the offer to use the size in the ZPL; files opened and dropped, a file in Windows-1252, base64 in a file and pasted, and wrong, damaged, empty and 5 MB input, each with its message; ten labels to a ten-page PDF, a ZIP of ten PNGs and the PNG in view, checked as above; a 51-label file, which shows 50 labels and makes a 51-page PDF; Print, which must give one 4 × 6 in page per label; the four page presets; and use offline.
Last tested: November 22, 2026. Result: the 35 engine tests passed, and the page tests passed in Chrome and Firefox (9 of 9) and in WebKit, the engine of Safari (8 of 8; the offline test does not run in WebKit). The print test measures the printed page in Chromium only; in Firefox and WebKit it checks that the Print button is not shown.
What is not drawn
Four kinds of barcode are not drawn: Code 49, CODABLOCK, TLC39 and GS1 DataBar composite symbols. In their place, and in place of a barcode command whose settings the viewer cannot read, it draws a crossed-out box that names the command, such as "^B4 not supported" or "^BQ has invalid parameters", and lists the command as not drawn. Data that a barcode type cannot hold is not always refused: letters in a UPC-A or EAN-13 field are drawn as zeros.
Fonts P to V have no stand-in and are drawn in font 0 at the size the command gives, with no note. A font called with ^A@ or ^CW that the ZPL does not download is drawn in font 0 too, and its command is listed as not drawn. A file that downloads a font with ~DU or ~DY is not drawn at all: the line under the preview says "This label could not be drawn. Check the ZPL and its graphic data."
Pictures and formats stored on your printer by earlier ZPL are drawn only when the same ZPL stores them first (~DG or ~DY with ^XG, ^DF with ^XF), and a picture stored with ~DG is found only when its name includes the memory, such as R:. A recall that finds nothing (^XG, ^XF, ^IL or ^IM) is listed as not drawn.
Commands that set up the printer rather than the label, such as print speed and darkness, and commands the viewer does not know change nothing in the picture. The line under the preview lists them as not drawn for the label in view, with how many times each appears.
Limits: ZPL text of up to 5 MB; a label of up to 40,000,000 dots (its width times its height at the chosen density); label stock from 6 to 500 mm each way; the first 50 labels of a file in the preview; and 80,000,000 dots for all the labels drawn at once, which on 4 × 6 in stock is 80 labels at 8 dpmm, 35 at 12 dpmm and 8 at 24 dpmm. Past a limit the viewer says "This input is too large. Use up to 5 MB of ZPL and a smaller label or batch.", or for the stock "Enter a width and height from 6 to 500 mm (0.237 to 19.685 in)." Smaller checks on the commands themselves, such as 16,384 characters in one field, can refuse a complex file below 5 MB, and a preview that takes more than 30 seconds is stopped with the message "This label could not be drawn. Check the ZPL and its graphic data."
Not tested yet: real phones; printing on paper (the print test measures the page size in Chromium's own PDF output); Print in Edge and other Chromium browsers; Copy picture in Firefox and Safari; the PDF in Adobe Acrobat; and labels printed on a Zebra printer, since the reference pictures come from a rendering service, not from a printer.
How to check that nothing is sent
You do not have to take this on trust. Three checks, from quickest to most thorough:
- Go offline. Load the viewer, turn off Wi-Fi, then paste a label or open a file. It is drawn and saved as before, which could not happen if the ZPL had to reach a server.
- Watch the network. Open your browser's developer tools, go to the Network tab, then type ZPL and open a file. The page fetches its own code from zplviewer.app and, if analytics is on, sends small requests to Google Analytics. None contains your ZPL, the text of a field, a barcode's data or a file name.
- Read the security policy. Every page is sent with a Content-Security-Policy header that tells the browser to block the page from sending data anywhere except zplviewer.app itself and Google Analytics.
Before each release, a test types and pastes ZPL with a marker in it, and opens a file with markers in its name, in a comment, in a text field and in a barcode's data, while Google Analytics runs; a marker in any request fails the test. The site has no session recording. What Google Analytics receives is on the privacy page.