Skip to content

PNG to XBM Converter

Convert PNG to XBM in your browser. PNG files usually come from screenshots, design exports, logos and web graphics; XBM is the better fit for X11 cursors, icons and C programs that embed bitmaps. You get a 1-bit X BitMap (C source), black and white at 50% brightness or dithered if you choose. Nothing is uploaded.

  • Processed locally
  • No upload, no wait
  • No sign-up
  • No watermark

Drop images here

or choose files · paste with Ctrl/⌘ V

PNG expected · other image formats also work

Files are processed on this device. Nothing is uploaded.0 B uploaded

How to use PNG to XBM

  1. 1

    Add your PNG files: drop them here, choose them, or paste from the clipboard.

  2. 2

    Pick the colour that replaces transparent areas, since XBM has none.

  3. 3

    Click Convert. Each file is decoded and encoded in a background thread on this device.

  4. 4

    Download the .xbm files one at a time or together as a ZIP.

Why use Aback Images for png to xbm

Where the XBM goes next

XBM opens in X11 utilities, GIMP, ImageMagick and XnView.

XBM next to PNG

A lossy XBM usually comes out far smaller than the PNG, which stores lossless DEFLATE with a prediction filter chosen per row.

The first lossy pass

The PNG holds 1, 2, 4, 8 or 16 bits per channel with nothing discarded yet. This conversion is the first lossy encode these pixels see, and hard edges and flat colour show it first.

Processed on your device

Your images are decoded, edited and encoded inside this browser tab by Web Workers. Nothing is uploaded to a server.

PNG vs XBM

What changes from PNG to XBM

Encoding: the PNG uses lossless DEFLATE with a prediction filter chosen per row; XBM uses none: bits written as hexadecimal bytes in C source, and the download is a 1-bit X BitMap (C source), black and white at 50% brightness or dithered if you choose.

Bit depth: 1, 2, 4, 8 or 16 bits per channel in the PNG; XBM allows 1 bit per pixel, and the XBM written here has 1 bit per pixel. 16-bit PNGs from photo and scientific software are reduced to 8 bits per channel.

Colour: RGB, greyscale, or an indexed palette of up to 256 colours in the PNG; XBM supports two colours, foreground and background, written here as pure black and white.

Transparency: the PNG stores it as a full alpha channel, so edges and shadows can fade smoothly; the XBM has none, so transparent areas are filled with the colour you choose.

Metadata: the PNG can carry text chunks, an ICC profile, physical resolution and EXIF in an eXIf chunk; XBM can carry the #define names for width, height and an optional hotspot, but nothing is copied across.

About PNG

PNG stores pixels losslessly with full alpha transparency. It is ideal for screenshots, logos, UI and anything with sharp edges, but photos saved as PNG are several times larger than JPEG.

A PNG opens with an 8-byte signature and is a chain of chunks, each with its own CRC: IHDR (size, depth, colour type), optional PLTE and tRNS for palettes, one or more IDAT chunks with the compressed rows, and IEND.

PNG files usually come from screenshots, design exports, logos and web graphics.

About XBM

XBM is the 1-bit image format of the X Window System, written as C source code so it can be compiled straight into a program. It was used for cursors, icons and window decorations, and early web browsers displayed it.

An XBM file is C code: '#define name_width 16', '#define name_height 16', optional x_hot and y_hot lines, then 'static unsigned char name_bits[] = { 0x00, ... };' with each byte holding eight pixels, least significant bit first.

When converting PNG to XBM makes sense

XBM is the better choice for X11 cursors, icons and C programs that embed bitmaps, while PNG suits screenshots, logos, graphics and anything that needs transparency.

XBM strengths: Plain text that compiles into C programs; Tiny for small icons. Drawbacks to weigh: Black and white only; Large as text for big images; Dropped by modern browsers.

Limitations

  • Text, icons and flat colour from a PNG are where lossy encoders struggle first: ringing and blur appear around hard edges, so keep the quality high for screenshots.
  • A PNG that only holds flat colour can come out larger in a lossy format, because the lossy encoder spends bytes on detail the image does not have.
  • XBM holds two colours only, so the picture is reduced to black and white at 50% brightness, or with dithering if you turn it on.
  • XBM is plain C source text, so large images make large files; it is meant for icons, cursors and line art.
  • Only two colours survive the conversion.

Frequently asked questions

Does converting PNG to XBM lose quality?

XBM is lossy, so detail the eye barely notices is discarded to save space. 16-bit PNGs from photo and scientific software are reduced to 8 bits per channel.

What happens to transparency when converting PNG to XBM?

PNG stores transparency as a full alpha channel, so edges and shadows can fade smoothly. XBM has no alpha channel, so transparent pixels are composited onto a solid colour, white unless you pick another. To keep transparency, convert to PNG, WebP or AVIF instead.

Which apps open XBM files?

X11 utilities, GIMP, ImageMagick and XnView. It does not open in web browsers.

Are my images uploaded anywhere?

No. Processing happens inside your browser with WebAssembly and Web Workers. The site only downloads the app code and codecs; your files never leave your device. You can confirm this with the live upload counter on the tool, or in your browser's network panel.

Can I process many files at once?

Yes. Drop a whole selection or folder. Files are processed in parallel on several worker threads, each result can be downloaded on its own, and everything can be saved as one ZIP.

Is it free? Is there a file limit or watermark?

It is free with no account, no watermark and no daily limit. The only limit is your device's memory: very large images (over roughly 100 megapixels) may be refused to keep the tab from crashing.