PPM to JPG Converter

Turn a PPM image into a regular JPG file.

or drop files here

PP

PPM Format

Portable Pixmap

The color member of the Netpbm family. Each pixel stores red, green and blue samples, in plain-text or binary form.

  • P6 binary and P3 plain text
  • RGB samples
  • Maximum value 1 to 65535
  • Part of Netpbm
JP

JPG Format

JPEG image

A lossy raster format from the Joint Photographic Experts Group, made for photographs. It has no alpha channel.

  • Lossy compression
  • 8 bits per channel
  • No transparency
  • Opens everywhere

How to convert PPM to JPG

Follow these steps to convert PPM to JPG online.

    1

    Choose your PPM file, or several at once.

    2

    Wait while the converter turns each file into JPG.

    3

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

What to know before converting PPM to JPG

  • ImageMagick runs in your browser and reads one image from each PPM.
  • The page sets no quality, so you cannot choose a JPG quality.
  • A picture over about 537 megapixels is refused.
  • Several PPM files convert in turn, one JPG each.

About PPM files

What is a PPM file?

PPM is the name of Netpbm's portable color pixel-map format. Each pixel is made of red, green and blue samples, with a maximum sample value that may fall anywhere between 1 and 65535. A normal binary PPM announces itself with P6, while the less common plain-text form uses P3.

Several images can follow one another in a raw PPM without any separator. The usual media type, image/x-portable-pixmap, is conventional and is not registered with IANA.

The design is plain on purpose. A PPM has little metadata and a redundant pixel layout, so files can be large next to images prepared for distribution. That simplicity is also why it appears in scripts and image-processing experiments, and why it is often turned into a JPG before anyone else sees it.

Programs that open PPM files

Windows, Mac and Linux:

  • ImageMagick reads and writes PPM color images.
  • Provided by Netpbm are the libnetpbm reader and tools for working on PPM files.

PPM and JPG compared

  • Compression: PPM stores its samples as they are. Baseline JPEG discards information: the picture is divided into 8x8 pixel blocks, every block is passed through a DCT (a discrete cosine transform) before Huffman coding packs the result.
  • Size: at everyday JPEG settings the result is a small fraction of the raw size, roughly a tenth to a twentieth.
  • Depth: a PPM may use sample values up to 65535, whereas JPEG stores 8 bits per color channel.
  • Alpha: neither format holds transparency, since a PPM is RGB only and JPEG has no alpha channel.
  • Name: the abbreviation stands for Joint Photographic Experts Group, a body whose effort started in 1986.
  • Standard: two documents define it, ITU-T T.81 (1992) and ISO/IEC 10918-1 (1994).
  • Progressive mode: JPEG can show a coarse version of the image first and sharpen it as more data loads.
  • Quality: the scale generally runs from 0 to 100, GIMP starts at 85, and one number can mean different results between programs.
  • Extensions: the same format sits behind .jpg and .jpeg, and layers cannot be stored in it.
  • Reach: JPEG is built into most digital cameras and scanners, and every major browser displays it.
  • Patents: JPEG's US patents expired on 27 October 2006.
  • Media type: image/jpeg is registered for JPEG.

ImageMagick, compiled to WebAssembly, decodes the PPM on the main thread of your browser tab and writes a JPG. It reads one image from the file, so a raw PPM holding a sequence of pictures still gives a single JPG. Because the page supplies no quality value and strips nothing explicitly, you cannot pick a JPG quality here. If the picture exceeds about 537 megapixels, conversion fails and a message says it is too large.

Nothing is uploaded and no other size limit applies, so a big file mostly costs time. Files are processed in sequence, every JPG downloads on its own and your PPM stays unchanged.

If you need a particular quality, use one of the commands below on your own computer.

Other ways to convert PPM to JPG

  • Netpbm: run pnmtojpeg -quality=90 image.ppm > image.jpg. The program reads a Netpbm image and writes JFIF to standard output, and n in -quality runs from 0 (worst) to 100 (best), with a default of 75. Values below about 25 can give images that some interpreters cannot read. For a PPM input the output is in YCbCr format.
  • ImageMagick: type magick image.ppm -quality 90 image.jpg. According to ImageMagick, -quality controls the compression level of JPEG encoders.
  • IrfanView: load the PPM through File > Open, and under File > Save as pick JPG. IrfanView's format table shows PPM and JPG as readable and savable.

Problems with PPM files

  • Large files: the redundant layout and sparse metadata make PPMs big next to compressed images.
  • Eight-bit readers only: certain readers handle just one eight-bit image. pnmtopnm can normalize awkward input, and pamdepth lowers the depth.
  • Gamma surprises: files labeled PPM sometimes hold sRGB or linear values rather than the specified transfer function, and pnmgamma can reconcile them.
  • Viewer will not open it: try GIMP, IrfanView, XnView MP or the Netpbm tools, all of which open PPM.
  • Blocky detail: the 8x8 block approach of baseline JPEG means hard edges and text can show artifacts.

Frequently Asked Questions

Everything you need to know about our converter

How do I convert a PPM to JPG?

Why is my PPM so big?

Is there a quality control?

Will converting reduce quality?

What is the difference between P6 and P3 PPM files?

Does it handle 16-bit PPM files?

Why do the colors look off after converting?

Is transparency kept?

Is there a size limit?

Can I convert many PPM files?