.pnm
🖼️ ImageText-based

.pnm File — Portable Anymap

image/x-portable-anymap

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

PNM

Drop a .pnm file here or click to choose

Or drop any file to identify its extension

Expected MIME type:image/x-portable-anymap

Quick Facts

Extension.pnm
Full NamePortable Anymap
MIME Typeimage/x-portable-anymap
CategoryImage
TypeText-based (human-readable)
Typical Size100 B – 100 MB
First Appeared1988

What Is a .pnm File?

PNM (Portable Anymap) is a collective designation for the Netpbm family of image formats, encompassing PBM (bitmap), PGM (graymap), and PPM (pixmap). When a file uses the .pnm extension, the actual format is determined by the magic number in the file header — P1/P4 for PBM, P2/P5 for PGM, and P3/P6 for PPM. The PNM extension is commonly used by tools and libraries that handle all three Netpbm formats transparently, allowing programs to work with monochrome, grayscale, and color images through a single interface. The Netpbm library and toolset, which has been maintained since the late 1980s, provides extensive support for PNM files including format conversion, image filtering, geometric transformations, and composition operations. PNM is frequently used as an intermediate format in image processing pipelines, where images are converted from their source format to PNM, processed through multiple Netpbm tools piped together, and then converted to the desired output format. The formats are implemented in virtually every image processing library across all major programming languages.

How to Open .pnm Files

GIMP
IrfanView
XnView
ImageMagick
any Netpbm viewer
Photoshop

Related File Extensions

More Image File Extensions

Other image formats you might encounter

Browse File Extensions by Category

Explore our reference of 259 file extensions with details, programs, and related formats.