How Does Base64 Fit Into ZPL Labels?
ZPL (Zebra Programming Language) is the command language most Zebra thermal label printers use. To embed a graphic — a logo, barcode image, or icon — in a label, ZPL's ~DY download command needs the image data encoded as text. Per Zebra's own ZPL II Programming Guide, that data can use plain ASCII hex, or the more compact :B64: format, which is standard Base64 — "a drop-in replacement for the existing ASCII hexadecimal encoding," per Zebra's documentation.
What Does a Base64 ZPL Image Block Look Like?
The general structure Zebra defines is: the encoding identifier, the encoded data, then a colon followed by a 4-digit hexadecimal CRC that the printer checks before accepting the download.
~DYR:OBJECT.GRF,B,B,total_bytes,,:B64:<base64-encoded-image-data>:CRC
Upload an image above to generate the :B64:-encoded portion and a filled-in template. The CRC field is left as a placeholder — see the note above for why it can't be safely guessed.
Why Not Calculate the CRC Automatically?
The printer validates the CRC-16 checksum on the data it receives and aborts the download entirely on a mismatch. Publishing a checksum without being certain it matches the exact variant your printer firmware expects would produce a template that looks complete but silently fails — worse than leaving it as an explicit placeholder. Label design tools like Labelary's ZPL viewer and ZebraDesigner calculate this correctly as part of their send/print pipeline.
What Image Types Work Best for ZPL Labels?
Thermal label printers render 1-bit monochrome graphics natively. A small PNG or bitmap logo converts cleanly; photographic or full-color images will be flattened to black-and-white by the printer or by your label design software before printing, so simple high-contrast logos and barcodes produce the best results.
Is This Converter Private?
Yes. The image is read and Base64-encoded entirely in your browser using the FileReader API — nothing is uploaded anywhere.
Frequently Asked Questions
Can ZPL use Base64-encoded images?
Yes. Zebra's ~DY download command accepts image data in :B64: (Base64) or :Z64: (LZ77-compressed then Base64) format as an alternative to ASCII hex encoding.
Why does my generated ZPL fail with a CRC error?
This tool leaves the CRC as a placeholder since it can't be safely calculated without matching your printer's exact expected checksum. Run the template through a ZPL preview/send tool such as Labelary or ZebraDesigner, which fills in the correct CRC automatically.
Is this the same as regular Base64 encoding?
Yes — the :B64: data itself is standard Base64 (RFC 4648), identical to what any Base64 image encoder produces. ZPL just wraps it in a printer-specific command with a length and checksum.