XBM to PNG Converter

Add an .xbm, the black-and-white picture written as text, and get a PNG you can open and share like any other image.

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. Your browser reads the .xbm as text
  2. Its width, height and list of numbers become pixels
  3. Those pixels are saved as a PNG

What it does

Comments stay in the text

Notes and extra lines in the file are skipped, so only the drawing itself turns up in the PNG.

Limits An older X10 file, whose list of numbers is labelled short instead of char, is refused.

What will the icon in your .xbm look like as a PNG?

Black on a solid white square. The white is part of the picture, not a gap around it.

Which part of an .xbm becomes the picture?

An .xbm is plain text, so a text editor will open it even when nothing else will. Near the top sit two lines giving the picture's width and height. Under them comes a long list of numbers such as 0x3c, separated by commas.

Each of those numbers draws eight pixels of one row. Our sample Earth is 96 pixels wide, which takes 12 numbers a row.

Why does the icon come with a white square around it?

Because FluffyBench draws each 1 in the list black and each 0 white, and the white is painted in just like the black.

Here is the PNG of our sample, laid over a checkerboard.

The Earth in black shapes on a solid white square; no checkerboard shows anywhere, not even in the corners.

The PNG

No checkerboard shows through: all 9,216 pixels are solid black or white. How we measured · Photo: NASA, Public domain, NASA-created image, via Wikimedia Commons.

On a white page you won't see the square. On a dark chat or a dark slide, the icon will sit inside a white box.

Turning the .xbm into a PNG

  1. Tap Choose images and find the .xbm file.

  2. Convert 1 to PNG turns its numbers into a picture.

  3. Keep the PNG with the arrow on the finished card.

    The finished PNG of the black-and-white Earth on its card, with the download arrow outlined.
    The finished PNG of the black-and-white Earth on its card, with the download arrow outlined.

Back to a list of numbers

The program that uses the icon only reads .xbm files.

FluffyBench's XBM converter

With XBM as its To format, it writes your PNG out as width, height and numbers again.

Search FluffyBench