PGM to PNG converter



Supported image types: PGM, PPM, PBM, PNM
Max file size: 200MB. All uploaded files are automatically deleted 1 hour after upload.

Online Netpbm PGM to PNG Converter

Convert Netpbm Portable Graymap (.pgm) files into lossless grayscale PNG images. PGM is the single-channel grayscale member of the Netpbm family, identified by the magic header P2 (plain ASCII decimal luminance values) or P5 (raw binary grayscale bytes) followed by width, height, and maximum gray value (Maxval up to 65535).

Common Uses of PGM Files

PGM is widely used in ROS (Robot Operating System) occupancy grid maps (map_server), computer vision benchmarks (such as AT&T/ORL face datasets), medical imaging pipelines, and depth-camera frame dumps. Converting .pgm to PNG compresses the raw grayscale array losslessly so you can embed occupancy maps in documentation, view them in any browser, or edit them with standard image tools.

How to Convert PGM to PNG

  1. Select your .pgm file (P2 ASCII or P5 binary) from your device or via URL.
  2. Click "Convert to PNG!" to encode a lossless PNG image.
  3. Download the PNG, or crop and resize it using our crop tool and image resizer.

Working with other Netpbm formats? Try our PPM to PNG (RGB color) or PBM to PNG (1-bit monochrome) converters.