XPM to PNG Converter

Add an .xpm icon and get a PNG that keeps its see-through background, for any app that won't open the XPM.

FluffyShield Protected workspace
FluffyShield

Isolated workspace: other page scripts can't read your files. How FluffyShield works

Free · No upload · No sign-up · No usage quotas

PNG options here: browser or advanced encoder; RGBA, RGB, grayscale or indexed color; 8- or 16-bit; Fast, Balanced or Maximum compression; interlacing. Which PNG settings are worth changing?

How it works
  1. The XPM's legend of codes and colors is read
  2. Each code in the rows is looked up, None as clear
  3. The pixels are packed into a PNG

What it does

A third of the letters

Spelling every pixel out in letters takes room. The PNG of our sample took about a third of it.

Our Earth icon as a PNG, against its XPM: 64.8% smaller

Limits An XPM2 file, the plain kind with no /* XPM */ line at the top, is refused.

Will your XPM icon keep its clear background as a PNG?

Yes, every pixel of it, so the icon sits on whatever is behind it with no box around it.

What does “None” mean in an XPM?

An XPM is written in letters, so a text editor shows it plainly. A legend near the top pairs short codes with colors, and the rows below spell the picture out one code per pixel.

Our sample icon of the Earth opens its legend with the line AA c None. Wherever a row says AA, the pixel has no color at all. FluffyBench reads None as fully see-through, and the PNG has room for that: all 2,474 None pixels of our sample came out clear, out of 9,216 pixels.

The PNG of our sample on a checkerboard, whole and at its top-left edge.

The Earth in full color, the checkerboard showing in every corner around it.

The PNG

Large square pixels: checkerboard squares on one side, solid colored squares on the other, meeting in a staircase with nothing faint between.

One corner, close up

Each pixel is fully there or fully gone, so the edge is a staircase: the XPM had no soft edge to pass on. How we measured · Photo: NASA, Public domain, NASA-created image, via Wikimedia Commons.

Saving the icon as a PNG

None needs no setting: it stays clear on its own.

  1. Select your .xpm after pressing Choose images.

  2. Start the PNG with Convert 1 to PNG.

  3. Grab the PNG from the arrow on its card; the clear corners stay clear.

    The finished PNG of the XPM picture on its card, with the download arrow outlined.
    The finished PNG of the XPM picture on its card, with the download arrow outlined.

If the clear background can't come along

It has to be a JPG, which has no clear pixels.

FluffyBench's XPM to JPG converter

Each None pixel is painted a color you choose.

Search FluffyBench