PBM to PNG Converter

Turn a two-tone Netpbm PBM bitmap into a lossless PNG in your browser.

or drop files here

PB

PBM Format

Portable Bitmap

Netpbm’s two-tone raster format, stored as readable digits or packed binary samples.

  • Black or white pixels
  • P1 and P4 variants
  • Intermediate image interchange
PN

PNG Format

Portable Network Graphics

A lossless raster format with grayscale, indexed, and truecolor modes, plus optional per-pixel transparency.

  • Lossless pixel compression
  • Alpha support
  • Widely used for screenshots

How to convert PBM to PNG

Follow these steps to convert PBM to PNG online.

    1

    Choose your PBM file, or several at once.

    2

    Wait while the converter turns each file into PNG.

    3

    Download each new PNG file. Your original file isn't changed.

What to know before converting PBM to PNG

  • A PBM is two-tone, so the PNG is black and white.
  • Only one picture is read, even from a raw PBM with several images.
  • PNG compression is lossless and no quality setting is passed.
  • Conversion runs in your browser; each file downloads separately.

PBM to PNG: format guide

What is a PBM file?

PBM, short for Portable Bit Map, describes two-tone raster images, and Netpbm uses it as the glue between image-processing programs. The raw variant opens with P4 and packs its pixels bit by bit. The plain variant opens with P1 and spells pixels out as zeros and ones, with a one meaning black and a zero meaning white. Raw PBM permits consecutive images, while plain PBM contains one. The customary MIME label is image/x-portable-bitmap, which Netpbm notes is not registered with IANA.

Programs that open PBM files

  • Windows, Mac and Linux: ImageMagick reads PBM images, and XnView MP lists PBM among its readable formats. XnView MP is free for private and educational use.

PBM and PNG compared

PNG started as a patent-free alternative to GIF and is standardized as ISO/IEC 15948:2004. Its compression loses nothing, and pictures can be indexed, grayscale or truecolor, with samples from 1 to 16 bits and transparency available through an alpha channel. A PBM carries only black and white, so a PNG made from it is a two-tone picture in a file that more programs can open. Every major browser shows PNG, and the media type is image/png.

Your browser runs ImageMagick here, and it takes one picture from the PBM. No quality setting is passed, since PNG has none to adjust. Add several PBMs and each is processed in turn and saved on its own; the originals stay as they were.

Other ways to convert PBM to PNG

  • ImageMagick: run magick stencil.pbm stencil.png. Its formats page marks both PBM and PNG as readable and writable.
  • Pillow: in Python, after from PIL import Image, run Image.open("mask.pbm").save("mask.png"). Pillow reads plain and raw PBM and takes PNG from the file ending.

Problems with PBM files

  • No shades: color and gray shading cannot be represented directly in a two-tone image.
  • Large plain files: a plain PBM spends a text digit on each pixel, so it takes more space than the raw form.
  • Partial readers: some programs implement only a restricted part of the specification.
  • Several images in one file: Netpbm recommends a minimal single-image layout for interoperability.

Frequently Asked Questions

Everything you need to know about our converter

Why is my PNG only black and white?

What happens to a PBM that holds several images?

What is the difference between P1 and P4 PBM?

Can I choose a PNG compression level?

Is a PBM a bitmap in the Windows BMP sense?

Why does my PBM fail in another program?

What is a PBM file used for?

Can I convert a batch of PBM files?