Chip in

PBM file format (.pbm)

Netpbm 1-bit black and white bitmap.

Last updated

What is a PBM file?

In short: A PBM file (.pbm) is an image file in the PBM format. PBM stores one bit per pixel: black or white, with nothing in between. It can be converted to JPG, PNG or WEBP for free in a web browser with iHateFiles, without uploading it.

The original Netpbm format, and the ancestor of PGM and PPM.

PBM stores one bit per pixel: black or white, with nothing in between. It suits scanned line art, faxes, and the output of image processing that has already decided which pixels matter.

What PBM is good at

  • The smallest uncompressed raster format there is
  • Unambiguous: every pixel is one of two values
  • Reading one is almost trivial

Where PBM falls short

  • No grey, so photographs become unrecognisable
  • Dithering is the only way to suggest tone
  • Not viewable in a browser

When to use PBM

Use PBM for line art, scanned documents and the output of thresholding operations.

How to open a PBM file

Image processing and document scanning tools.

Opening a .pbm file on each platform
WindowsIrfanView or GIMP.
macOSGIMP or ImageMagick; Preview will not.
LinuxGIMP, ImageMagick and the netpbm tools.
PhoneNeeds a dedicated viewer.
In a browserNo browser displays PBM.

The thing that usually goes wrong

Converting a photograph to PBM produces something closer to a stencil than a picture. That is the format working correctly, not a fault.

Inside a PBM file

PBM is the simplest image format that can be said to exist. Every pixel is one bit: black or white, nothing between. The header is P4, a width and a height, and then the bits packed eight to a byte.

It was built for fax and for early laser printers, both of which are one-bit devices, and it survives in document scanning and OCR pipelines where the image has already been thresholded to pure black and white before recognition runs.

PBM at a glance
Full namePortable Bitmap
Magic bytesP4 for binary, P1 for ASCII
ColoursTwo — one bit per pixel
PackingEight pixels per byte
CompressionNone
Common inFax, OCR and document scanning

Questions

What is a PBM file?

Netpbm 1-bit black and white bitmap. Files use the .pbm extension.

How do I open a PBM file?

Most image software opens PBM directly. If yours does not, convert it here to something more common. It takes a few seconds and nothing is uploaded.

Can I convert PBM for free?

Yes. Every conversion here is free and unlimited, because your own device does the work rather than a server we have to pay for.

Is PBM lossless?

Partly. The compression itself loses nothing, but PBM first reduces the image to one bit per pixel, pure black and white, and that step cannot be undone. Flat graphics survive it well; photographs visibly do not.