Skip to content

PBM File Format (.pbm)

A PBM file stores a strictly black-and-white, one-bit-per-pixel raster image as plain ASCII characters or packed binary bits, in the Netpbm project's Portable Bitmap format.

.pbmImage Files

PBM at a glance#

Full namePortable bitmap format (black and white)
File extension.pbm
CategoryImage Files
DeveloperJef Poskanzer
First released1988
MIME typesimage/x-portable-bitmap
CompressionUncompressed
SpecificationNetpbm PBM format specification
FileFlip supportFileFlip reads and writes this format

What a .pbm file can hold#

These are the things a PBM file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

Human readableYes

Strengths and limitations of PBM#

What PBM does well

  • About as simple as an image format can be: a width, a height, and one bit per pixel
  • The plain-text P1 variant can be typed or read directly in a text editor
  • Decoding needs no libraries or lookup tables, just width times height bits

Where PBM falls short

  • Strictly one bit per pixel, so it cannot represent greyscale or colour at all
  • No compression, so even a simple black-and-white image produces a large file
  • No metadata, transparency or animation support

Use PBM for a strictly black-and-white bitmap, such as a fax page or a stencil mask, that needs to move between tools without any image library.

Convert PBM to PNG once the image needs compression or has to sit alongside greyscale or colour images in the same pipeline.

How to open a .pbm file#

A .pbm file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts PBM into a format your machine already opens, and it does it in the browser tab rather than on a server.

PlatformPrograms that open it
WindowsGIMP, IrfanView, ImageMagick
macOSGIMP, ImageMagick
LinuxGIMP, ImageMagick, Netpbm tools
WebFileFlip

PBM questions people ask#

What does PBM stand for?

PBM stands for Portable Bitmap, the black-and-white member of the Netpbm family of image formats that Jef Poskanzer created to move images between Unix tools. It is the strictly one-bit sibling of the colour PPM and greyscale PGM formats.

Is a 1 a black pixel or a white pixel in a PBM file?

In a PBM file, a 1 represents a black pixel and a 0 represents a white pixel, which is the opposite of what many people expect from a plain greyscale scale. This is defined directly in the Netpbm project's own PBM specification.

Why is my PBM file bigger than a similar PNG?

A PBM file stores one bit per pixel with no compression at all, while PNG compresses that same data losslessly, so a large black-and-white image can end up many times smaller as a PNG. PBM trades file size for a format simple enough to read and write without any image library.

Converting PBM files#

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.