PBM to PNG Converter

Add a .pbm and get a PNG of the same black-and-white picture that any phone or computer opens.

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 .pbm's digits or bits are read
  2. Each pixel becomes black or white
  3. The pixels are saved as a PNG

What it does

Two colors, exactly

Every pixel of the PNG is pure black or pure white. Pillow, an image library we used as a second reader, decoded our test PBMs to the very same pixels.

Pixels that differed, plain-text photo: 0 of 12,288 pixels changed

Digits or packed bits

A PBM written out in digits and one packed into bytes open the same way. Our two copies of one photo, one of each kind, gave the same PNG.

Limits A PBM ending before its last row gets an error, not half a picture.

What do the 0s and 1s in your PBM become?

Pixels, one for each digit, black or white just as the PBM format sets out.

Which digit makes a black pixel in a PBM?

A plain-text PBM holds a short header, then rows of 0s and 1s, one digit for each pixel. Netpbm's description of the format says 1 is black and 0 is white, as if each 1 were a dot of ink on white paper, and FluffyBench reads every PBM that way.

In the .pbmIn the PNG001100001111010110000000010000100001111000001100

Digits and pixels

Every 1 in the file is a black pixel in the PNG, and every 0 a white one. How we measured

Saving the bitmap as a PNG

Have the .pbm ready; Settings can stay as they are.

  1. Choose images opens your files: select the .pbm there.

  2. Press Convert 1 to PNG.

  3. Look at the small picture on the finished card.

    The finished card for a plain-text PBM of a mountain photo, its small black-and-white picture beside the Download button, which is outlined.
    The finished card for a plain-text PBM of a mountain photo, its small black-and-white picture beside the Download button, which is outlined.
  4. If black and white are where you expect, take the PNG with the arrow below it.

Where else can the bitmap go?

A form insists on a JPG.

FluffyBench's PBM to JPG converter

It works, but expect a much bigger file: our test bitmap's JPG was five times the size of its PBM.

You've edited the PNG and need a PBM again.

FluffyBench's Netpbm converter

Set its To menu to PBM. It turns any grays into black or white, by a plain cut-off or with scattered dots.

Search FluffyBench