Add your PGM file
Drop one or more .pgm files onto the converter above, or browse for them. They load into browser memory only — nothing is uploaded, so there is no size-based pricing and no server queue.
Converting a .pgm image to .png re-encodes the pixels for a different balance of size, quality, and support. Free, private, and validated — the file never leaves your browser.
Batch files can each use a different output. Nothing uploads for local conversions.
Working inputs include camera RAW, browser-local audio/video, PDF, CBZ/CBR comics, office documents, ebooks, markup, 3D models, structured text, images, and archives.Converting a .pgm image to .png re-encodes the pixels for a different balance of size, quality, and support. A .pgm file is a Portable Graymap: a single-channel greyscale image storing one intensity value per pixel, with the maximum value declared in the header. It is the middle rung of the Netpbm ladder — richer than a one-bit bitmap, simpler than a colour pixmap.
A .png file is a losslessly compressed raster image with full 8-bit alpha transparency, making it the standard choice for graphics that must stay pixel-perfect. Screenshots, logos, UI assets, and diagrams are the classic .png territory, since sharp edges and flat color survive without compression artifacts. For this route the practical draw is perfectly lossless, so files can be opened and re-saved indefinitely and true 8-bit (or 16-bit) alpha channel — balanced against photographic content produces files several times larger than JPEG or WebP, which is worth knowing before you commit a large batch.
The practical trigger for this conversion is usually a mismatch: with .pgm, uncompressed, so files are large relative to PNG for the same data. Switching to .png buys you perfectly lossless, so files can be opened and re-saved indefinitely, which is why it is the better fit for screenshots and screen recordings exported as stills. Because the conversion runs locally, trying it costs nothing but a few seconds of compute on your own machine.
| Aspect | Portable graymap (.pgm) | PNG image (.png) |
|---|---|---|
| Format type | Lossless — every pixel or sample is preserved exactly | Lossless — every pixel or sample is preserved exactly |
| How it stores data | p2 stores samples as whitespace-separated ASCII integers; P5 stores them as raw bytes | uses DEFLATE compression preceded by per-scanline prediction filters (None, Sub, Up, Average, Paeth) |
| Strongest at | machine vision and image-processing pipelines that operate on intensity alone | screenshots and screen recordings exported as stills |
| Weak spot | uncompressed, so files are large relative to PNG for the same data | photographic content produces files several times larger than JPEG or WebP |
| Metadata | none beyond header comments. No colour profile, no EXIF, no acquisition metadata — anything an instrument recorded alongside the pixels has to travel in a separate file | text metadata lives in tEXt/iTXt chunks and XMP can be embedded there; standardized EXIF arrived late via the 2017 eXIf chunk, so many tools still drop EXIF when writing PNG |
Drop one or more .pgm files onto the converter above, or browse for them. They load into browser memory only — nothing is uploaded, so there is no size-based pricing and no server queue.
Select .png in the output menu next to each file. The menu only offers targets this engine can genuinely produce, so if PNG is selectable, the route is real and validated.
Press Convert. Decoding and re-encoding happen on your device using the browser's native image pipeline and hand-tuned encoders.
Each result is signature-checked before the download unlocks, so a failed encode can never masquerade as a valid PNG file. Outputs keep the original filename with the .png extension.
Since pgm is lossless-oriented and png is lossless-oriented, the conversion preserves the source content exactly as stored; no additional compression pass is applied beyond what .png itself requires.
Yes — the .pgm file is processed inside your browser tab and never uploaded. Decoding and re-encoding happen on your device using the browser's native image pipeline and hand-tuned encoders. Close the tab and the file is gone from memory.
Every modern browser has rendered PNG with full alpha since Internet Explorer 7 fixed its transparency bug in 2006, and native OS support is universal on Windows, macOS, Linux, iOS, and Android. It is also the required format in many contexts, such as iOS app icons and favicon fallbacks.
It depends on the content: uses DEFLATE compression preceded by per-scanline prediction filters (None, Sub, Up, Average, Paeth). Convert one representative file first and compare before batch-processing a large set.
In .pgm, none beyond header comments. No colour profile, no EXIF, no acquisition metadata — anything an instrument recorded alongside the pixels has to travel in a separate file. Re-encoding through the browser pipeline does not carry embedded metadata into the output, which doubles as a privacy scrub — check the exported file if you specifically need tags preserved.
Yes — the reverse route exists as a separate tool. Bear in mind that round-tripping .pgm → .png → .pgm is not a perfect undo when any lossy step is involved; keep your original if fidelity matters.