JPG to PBM Converter

Turn a JPG into a black-and-white PBM bitmap, right in your browser.

or drop files here

JP

JPG Format

JPEG image

A lossy raster format defined by the Joint Photographic Experts Group, standardized as ISO/IEC 10918-1 in 1994. The .jpg and .jpeg extensions name the same format.

  • Lossy compression
  • 8 bits per color channel
  • No transparency
  • Image media type image/jpeg
PB

PBM Format

Portable Bit Map

The two-tone member of the Netpbm family. Netpbm uses it as an intermediate between image-processing programs.

  • One bit per pixel
  • Raw form starts with P4
  • Plain-text form starts with P1
  • A one bit means black

How to convert JPG to PBM

Follow these steps to convert JPG to PBM online.

    1

    Choose your JPG file, or several at once.

    2

    Wait while the converter turns each file into PBM.

    3

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

What to know before converting JPG to PBM

  • Every pixel becomes black or white, so color and gray shading are gone.
  • The page has no threshold setting: darker pixels become black and lighter ones white.
  • The PBM is written in the packed binary form that starts with P4.
  • EXIF, ICC profiles and XMP are not carried over.
  • Several files run one after another, each giving its own PBM.

About JPG files

What is a JPG file?

Most photos you handle are JPGs. A committee of photography and imaging experts began work on the format in 1986, ITU-T published it as T.81 in 1992, and ISO followed with part 1 of 10918 in 1994. The compression is lossy and works on blocks of 8x8 pixels, which is why a JPG is far smaller than the raw pixels.

Each color channel gets 8 bits, and there is neither transparency nor a layer stack. The .jpg and .jpeg endings are interchangeable, and most cameras and scanners produce the format. Its media type is image/jpeg.

Programs that open JPG files

  • Windows, Mac and Linux: GIMP opens a JPEG for retouching, while ImageMagick handles it from the command line.
  • Web and Mobile: Chrome displays JPG.
  • Web: Firefox displays JPG.
  • Mobile: Safari displays JPG.

JPG and PBM compared

PBM is the Portable Bit Map of the Netpbm family, a two-tone format that Netpbm uses as an intermediate between programs. A raw PBM begins with P4 and packs its pixels as bits, while the plain variant begins with P1 and spells them as zeros and ones. A one bit means black. The conventional media type is image/x-portable-bitmap, which IANA has not registered.

On this page the browser decodes the JPG and ImageMagick, compiled to WebAssembly, writes the PBM, so every pixel ends up black or white. Open the PBM beside the JPG before you use it, to see what the black-and-white conversion kept.

Other ways to convert JPG to PBM

  • ImageMagick: run magick scan.jpg -colorspace Gray -threshold 50% scan.pbm to choose the cutoff yourself, and raise or lower the percentage for your scan.
  • GIMP: with the JPG open, use File > Export As, call the file scan.pbm, and choose ASCII or RAW under Data formatting. The export is black and white, not continuous grayscale.
  • Netpbm: run jpegtopnm scan.jpg | ppmtopgm | pamthreshold -simple -threshold=0.5 | pamtopnm > scan.pbm. The pamthreshold step writes a PAM file, so pamtopnm turns it into the PBM.

Problems with JPG files

  • No transparency: a logo that needs a clear background must start from a different format, because a JPG has none.
  • Quality numbers differ: an 85 in one editor is not an 85 in another, so re-saving the JPG in a different program can change its look.
  • Layers do not survive: editable layers cannot live in a JPG, so save the project in its own format.

Frequently Asked Questions

Everything you need to know about our converter

How do I convert JPG to PBM?

Why is my PBM only black and white?

Where is the cutoff between black and white?

Will a photo look right as a PBM?

Can I keep gray shades instead?

Is the PBM plain text or binary?

Does the PBM keep my camera data?

Why does my program reject the PBM?