Image format

PBM

Portable Bitmap: simple uncompressed raster samples for image-processing pipelines.

Explore the format

Convert PBM to

Choose a target format for your PBM images.

All 21 conversions

Marked paths may need steps such as flattening, rasterization, tone mapping or animation loss.

Convert to PBM

Choose a source format to convert to PBM.

All 36 conversions

Marked paths may need steps such as flattening, rasterization, tone mapping or animation loss.

About PBM

Portable Bitmap

PBM is the original Netpbm-family format for black-and-white raster images. Each pixel is either white or black, without intermediate gray levels or colour components. Its minimal structure was designed for trouble-free interchange, including a textual representation that could pass through early email systems.

P1 uses textual zeroes and ones; P4 packs pixels into bits with row padding. In PBM, one means black and zero means white, a convention that should not be confused with grayscale intensity. There is no alpha, animation or compression. A binary file uses one bit per pixel apart from header and row-padding overhead.

Use PBM for bitonal line art, binary masks and thresholded processing results. A photo or grayscale scan needs thresholding or dithering before it fits this model. That reduction discards continuous tonal information; converting PBM to an RGB format can colour the two states but cannot recreate the original shading.

Key capabilities

Compression
Uncompressed
Transparency
No
Animation
No
Extensions
.pbm
MIME type
image/x-portable-bitmap · Unregistered Netpbm convention
Metadata
Header, Comments
Best for
Bitonal line art & binary masks
Colour depth
1 bit/pixel

Netpbm stores these samples without compression. Reducing colour, thresholding or changing maxval can still lose information before storage; text and binary representations change the layout, not its image meaning.

History of PBM

This format belongs to the documented Pbmplus/Netpbm evolution. The history distinguishes the original bitmap idea, later channel models and library development.

  1. 1980s

    A simple interchange language

    Jef Poskanzer invents PBM to exchange bitmaps using a representation simple enough for text-only email. Its aim is robust interchange between otherwise incompatible graphics tools.

  2. 1988

    Pbmplus and colour formats

    Poskanzer distributes Pbmplus in 1988 and adds PGM and PPM by the end of that year. The toolkit extends the original bitmap exchange to grayscale and RGB images.

  3. 1993

    Netpbm replaces Pbmplus

    Netpbm begins as a new release of the unmaintained Pbmplus package, with fixes and improvements contributed over the network. The format family remains a bridge among graphics tools.

PBM compared

Different formats, different trade-offs. Choose for the image and the workflow.

PGM

PBM vs PGM

PGM stores one grayscale sample per pixel. It is suitable for grayscale processing and masks; exporting a colour image requires a deliberate luminance conversion and removes colour information.

PPM

PBM vs PPM

PPM stores three RGB samples per pixel without compression or alpha. It is easy to inspect in processing pipelines, but sacrifices compactness and rich metadata; select it when direct sample interchange is the priority.

PAM

PBM vs PAM

PAM extends Netpbm with explicit tuple types and depths, including RGB_ALPHA and GRAYSCALE_ALPHA. It suits channel-aware processing, but receiving tools must agree on the tuple meaning and it remains uncompressed.

PNG

PBM vs PNG

PNG preserves decoded pixels losslessly and can carry alpha. It is useful for transparent graphics and screenshots; it does not preserve editable document layers or camera sensor data, and photographic files can be large.

PBM FAQ

What does this format store?

PBM is the original Netpbm-family format for black-and-white raster images. Each pixel is either white or black, without intermediate gray levels or colour components. Its minimal structure was designed for trouble-free interchange, including a textual representation that could pass through early email systems.

How does compression affect quality?

Netpbm stores these samples without compression. Reducing colour, thresholding or changing maxval can still lose information before storage; text and binary representations change the layout, not its image meaning.

Can PBM keep gray shading?

No. It stores only black and white. Dithering approximates gray with spatial patterns of those two values; PGM is the related format for actual gray samples.

What should I check before opening the file?

Check the magic number, sample precision and tuple or channel meaning. Many simple readers accept only one binary image and 8-bit samples even though the specifications permit more.

What changes when I export to another format?

Preserve maxval and colour interpretation when creating the rendered output. Grayscale and bitonal targets remove information deliberately; alpha requires an alpha-bearing tuple or a separate mask. Optional comments may not transfer.

When is this format useful?

Use PBM for bitonal line art, binary masks and thresholded processing results. A photo or grayscale scan needs thresholding or dithering before it fits this model. That reduction discards continuous tonal information; converting PBM to an RGB format can colour the two states but cannot recreate the original shading.

Sources