Image format

PBM converter

A .pbm file is a Portable Bitmap: the simplest image format in common use, storing exactly one bit per pixel — black or white, with no grey and no colour. It carries a two-character magic number, the width and height, and then the pixels, and nothing else.

Private for supported formats — processed in your browser

Convert supported files

Runs on your device

Drop PBM files here

Batch files can each use a different output. Nothing uploads for local conversions.

Working inputs include camera RAW, browser-local audio/video, PDF, CBZ/CBR comics, office documents, ebooks, markup, 3D models, structured text, images, and archives.

Where PBM comes from

Jef Poskanzer released the pbmplus toolkit in 1988 so Unix programs could pipe images between each other without every pair of tools needing a shared library. PBM was the base of a deliberate ladder — bitmap, then greymap, then pixmap — and the toolkit became Netpbm, which is still maintained. The format was designed to be trivial to write from a shell script, and that is exactly why it survives.

How PBM works

  • Two encodings share the extension: P1 stores pixels as ASCII 0 and 1 characters, P4 packs eight pixels into each byte.
  • In P4 every row is padded to a whole byte, so a 12-pixel-wide image uses 2 bytes per row with 4 bits unused — mishandling that stride is the classic PBM bug.
  • The convention is inverted from most other formats: a bit value of 1 means black, not white.
  • There is no maximum-value field, because one bit admits no scale.
  • Whitespace between header fields is free-form, and # begins a comment that runs to end of line.

When to use PBM

  • Masks, stencils and other genuinely two-tone raster data
  • Fax-style scanned documents whose source is already bilevel
  • Generating an image from a script without linking an encoding library
  • Teaching and testing image pipelines, where a format you can read by eye beats compression

Strengths and limitations

Strengths

  • Small enough to specify in a paragraph and to write from a shell script
  • Uncompressed and lossless, so nothing is hidden between the header and the pixels
  • Very well supported by command-line tooling after nearly four decades

Limitations

  • One bit per pixel — no grey, no colour, no transparency
  • No compression at all; large bilevel images dwarf their PNG or TIFF equivalents
  • No browser displays it, so the web path is always a conversion
  • The inverted bit convention silently produces negatives in careless implementations

Compatibility

Netpbm, ImageMagick, GIMP and most scientific imaging tools read PBM; browsers and consumer applications do not. Novus Convert decodes both the ASCII and the packed binary form locally and converts to PNG, JPEG, WebP and the other raster targets — which is usually the point, since PBM is a good interchange format and a poor delivery one.

None beyond optional # comments in the header. There is no colour profile, no EXIF and no timestamp; a PBM carries dimensions and pixels and nothing else.