Skip to main content
🇪🇸 Español
Image Converter Video Converter Audio Converter Document Converter
Tools Guides Formats Pricing API
Log In
PNM file
pnm
File format

About PNM Files

Portable Anymap

Released 1988 By Jef Poskanzer

PNM (Portable Anymap) is a family of simple image formats comprising PBM, PGM, and PPM. These formats store pixel data in straightforward ASCII or binary layouts, making them easy to generate and parse programmatically.

Family

Raster & Vector Images

Extension

.pnm

MIME Type

image/x-portable-anymap

Can Use As

Input Output
The story

HOW PNM
CAME TO BE.

PNM — Portable aNyMap — is the umbrella extension for the Netpbm format family. Jef Poskanzer created the Netpbm toolkit in 1988 with three distinct-but-related formats: PBM for 1-bit bitmaps, PGM for grayscale, PPM for RGB. The .pnm extension is a wildcard that accepts any of them — tools see the first two bytes of the file (`P1` through `P6`), detect which variant it is, and parse accordingly.

For almost 40 years PNM files have been the scratch paper of Unix image processing. Scientific imaging, OCR preprocessing, batch image scripts — all pipe PNM between steps. The format is inefficient for storage (no compression, ASCII optional) but that is the point: when what you need is `cat a.pnm b.pnm | my-filter | display`, PNM’s simplicity beats every alternative.

CURIOSITIES &
TRIVIA.

01

The Netpbm toolkit (1988) still ships in most Linux distros — its tools (pnmtojpeg, anytopnm) glue together image-processing pipelines.

02

PNM files can be plain ASCII (P1/P2/P3) or binary (P4/P5/P6) — same content, 8× difference in file size.

03

Tesseract OCR preprocesses input images through PGM (the grayscale Netpbm variant) before OCR recognition.

04

The `.pnm` extension acts as a wildcard — tools auto-detect whether it's PBM, PGM, or PPM internally.

05

Jef Poskanzer also wrote thttpd, one of the first minimalist HTTP servers — also preserved in old Unix systems.

STRENGTHS &
LIMITATIONS.

Strengths

  • Stupidly simple — a 50-line parser handles every variant.
  • ASCII variant is human-readable and diff-able.
  • Universal Unix tooling support.
  • 40+ years of stability.
  • Wildcard extension covers three related formats.

Limitations

  • No compression — files are huge.
  • No color profile, metadata, or transparency.
  • Strictly a pipeline intermediate, not a delivery format.

Typical Sizes & Weights

512×512 grayscale (binary)

~256 KB

1920×1080 RGB (binary)

~6 MB

Technical Specifications

MIME type
image/x-portable-anymap
Extension
.pnm (umbrella), .pbm, .pgm, .ppm
Variants
P1-P6 (ASCII or binary × bitmap/graymap/pixmap)
Toolkit
Netpbm
Creator
Jef Poskanzer (1988)

CONVERT FROM
PNM

Common Use Cases

Unix image processing, quick prototyping, command-line image tools

Related Formats

Popular comparisons

Popular PNM conversions

The most-requested destinations when starting from PNM.

Frequently Asked Questions about PNM

Frequently Asked Questions

PNM (Portable Anymap) is an image format used to store raster graphics — a two-dimensional grid of pixels describing a picture. It is part of the raster & vector images family and designed around a specific trade-off between file size, visual fidelity, and feature support (transparency, colour depth, compression type). Photographers, web designers, and content creators choose PNM when its particular strengths match the publishing target.

Most desktop photo viewers (Windows Photos, macOS Preview, GIMP, Photoshop, Affinity Photo) open PNM natively. On mobile, iOS Photos and Google Photos display PNM in the gallery when supported by the OS. If the format is rare or new, convert to JPG or PNG first — both are universally readable — using our PNM to JPG or PNM to PNG converter.

Upload the PNM to KaijuConverter and pick a target format (JPG, PNG, WebP, HEIC, TIFF, BMP, SVG, PDF). The conversion runs in the browser via ImageMagick and returns a download in seconds. No account or installation required; both input and output delete automatically within two hours.

It depends on the task. JPG is the smallest file size for photographs; PNG is lossless with transparency; PNM has its own niche that may favour colour depth, animation, or encoding efficiency over one or both of those. For the final web publish, test all three and measure file size plus visible quality on real content.

We use cookies and similar technologies to personalise content and ads, and to analyse traffic. Learn more about cookies.