Convert an image to ZPL

To convert an image to ZPL, open the editor at your label size, add your PNG or JPG with Image, and place it on the label. Then print it to your Zebra, or download a .zpl file where the whole label, logo included, is one ^GFA graphic. Solid black logos come out best. Want text and barcodes around the logo too? Build the whole label in the ZPL editor online. Already have a .zpl file? Check it in the ZPL viewer online. Designing labels is free. Printing, downloading, exporting or batch printing may need a payment. The price, and how long access lasts, are shown before you pay.

Image to ZPL

The editor opens on a 4 x 2 Zebra label. Click Image, pick your logo, and drag it where you want it. Change the size first if your roll is different.

How it works

Your logo becomes black and white dots, then one ^GFA graphic

Dark parts of the image print black, light parts stay white. The label, logo included, goes to the Zebra as one ^GFA graphic.

1Step by step

How to turn an image into ZPL

Six steps, from a logo file to a label your Zebra can print.

  1. Click Open the editor and add your image above. https://app.mylabelmaker.com opens with a 4 x 2 Zebra label. Pick another size from the size menu if you need one.
  2. Click Image and pick your PNG or JPG.
  3. Drag the image into place and pull a corner to size it. Delete anything on the label you don't need.
  4. Under Choose a printer, pick Zebra Printer. In Zebra settings, set the DPI your printer has: 203, 300 or 600.
  5. Click Print to send the label to the Zebra through Zebra Browser Print.
  6. Or open Options and click Download ZPL (.zpl) to save the label as a .zpl file.

2Good images

Which images convert well

A thermal printer has no grey. Every dot is black or white, so each pixel of your image is turned into one or the other.

If your logo is in colour, save a black on white version first. A dark brand colour on a light background usually survives. Pastel colours usually drop out.

  • How it decides: a dot darker than the middle grey prints black, a lighter one stays white. There is no dithering, so there are no speckled shades.
  • Works well: solid logos, line art, icons and bold type in black on white.
  • Works badly: photos and light greys. They turn into flat black patches or vanish.
  • Transparent PNG: the clear parts print white, so a black logo on a transparent background is fine.

3Inside ^GFA

What ^GFA means

The image travels inside ZPL as a graphic field. In a downloaded .zpl it looks like ^GFa,b,c,d,data.

  • a is the format. A means ASCII hex.
  • b is the number of bytes sent.
  • c is the total number of bytes in the image.
  • d is the bytes per row. Each byte holds 8 dots, so the width in dots is 8 times d, and the height is c divided by d.

Here is a tiny one that is exactly right:

^XA^FO50,50^GFA,4,4,2,FFFFFFFF^FS^XZ

Two bytes per row and four bytes in all, so it is 16 dots wide and 2 rows tall. FF is eight black dots, so it prints a thin black bar 16 dots long, 50 dots in from the top left corner. A logo works the same way, with many more rows.

4Size for the DPI

Size the image for the DPI

A Zebra counts dots, so the same logo needs more of them on a sharper print head.

Start from an image at least that many pixels wide, so the edges stay clean when it is drawn at your printer's DPI. Set the DPI in the editor to match your Zebra. The DPI calculator does the math for the whole label.

Logo width on the label203 dpi300 dpi600 dpi
0.5 inabout 102 dots150 dots300 dots
1 in203 dots300 dots600 dots
2 in406 dots600 dots1200 dots

5Check it

Prepare a logo before you add it

A few minutes with your logo file saves a stack of test labels. Every pixel ends up black or white, so the cleaner the file, the cleaner the print.

  • Black on white: save a version of the logo in black on a white or transparent background. The clear parts of a transparent PNG print white.
  • Strong contrast: thin grey lines and soft shadows sit close to the middle grey, so they may print black or disappear. Make them darker, or take them out.
  • Enough pixels: for a logo 1 inch wide, start from at least 203 pixels across for a 203 dpi Zebra, or 300 pixels for a 300 dpi one.
  • A tight crop: trim the empty space around the logo, so it is easy to place and size on the label.

Common mistakes

  • Using a photo. With no dithering, it turns into flat black patches.
  • Leaving the Printer DPI on a different setting than your Zebra. Set it to 203, 300 or 600 to match the printer before you print.
  • Printing a whole roll before one test. Print one label, check the logo, then print the rest.

Preview the ZPL before printing

Got a .zpl file with a logo in it, from mylabelmaker or from somewhere else? Paste it into the ZPL viewer and click Preview. You see the label, logo and all, before a single label feeds.

If the logo comes out as a black box there, it will print as a black box too. Go back to the image and make it black on white.

Questions about image to ZPL

How do I convert a PNG to ZPL?

Open the editor from this page, click Image and pick the PNG. Place it on the label, choose Zebra Printer and your DPI, then print, or download the .zpl from Options.

Why does my logo print as a black box?

Every dot darker than middle grey prints black. A dark background, or a grey or coloured area that is too dark, turns solid black. Use a black logo on a white or transparent background.

Can I convert a JPG to ZPL?

Yes, the same way as a PNG. Click Image, pick the JPG and place it. A JPG has no transparent parts, so its background has to be white.

Can I reuse the logo on every label?

Yes. Save the label with the logo on it. Load your spreadsheet and the logo stays on the label for every row you print.