Home/PGM Converter/PGM to AVIF

Convert PGM to AVIF Online Free

Turn Portable Graymap files into AVIF Image files right in your browser — no upload, no sign-up. Your PGM never leaves your device.

Drop your PGM file here

or click to browse files

.pgm accepted

Why Convert PGM to AVIF?

PGM is built for grayscale images for computer vision and scientific work. Dead-simple grayscale pixels any program can parse is its big advantage, but there is a catch: no color and no compression. AVIF is designed for next-generation web images with the smallest possible file size, with files often 50% smaller than JPG with fewer artifacts, plus HDR and transparency. Converting PGM to AVIF makes sense when you need next-generation web images with the smallest possible file size, or when the app, website or person you're sending the file to expects AVIF.

PGM vs AVIF at a Glance

FeaturePGMAVIF
Created bythe Netpbm project (1988)the Alliance for Open Media (AV1 codec) (2019)
CompressionLosslessLossy or lossless
Color depth8-bit grayscale8, 10 or 12-bit
TransparencyNoYes
AnimationNoYes
Best forgrayscale images for computer vision and scientific worknext-generation web images with the smallest possible file size

What Changes When You Convert PGM to AVIF

How FxtImg Converts PGM to AVIF

PGM files (P2 and P5, 8 and 16-bit) are decoded by FxtImg's built-in Netpbm reader. The AVIF is encoded with the AV1 encoder from Google's Squoosh project (compiled to WebAssembly), or natively if your browser supports it.

When AVIF Is the Right Choice for Your PGM

Quick How-To & Settings

Drop your .pgm file in the box above, press Convert to AVIF, then download the SD or HD .avif. Pick SD (50% of the original dimensions by default) for responsive images and mobile pages, or HD (original size, recommended) for hero images and Retina screens. The quality slider sets AVIF compression.

Opening Your AVIF File

Your AVIF file opens in Chrome, Edge, Firefox and Safari 16+, Windows 11 (with the AV1 extension), macOS 13+ Preview and GIMP 2.10+.

Frequently Asked Questions

Does converting PGM to AVIF reduce quality?

AVIF is a lossy format, so a little detail is discarded to save space. At the HD preset (92% quality by default) the difference is practically invisible; lower the quality only if you need a smaller file.

What program opens AVIF files?

Your AVIF file opens in Chrome, Edge, Firefox and Safari 16+, Windows 11 (with the AV1 extension), macOS 13+ Preview and GIMP 2.10+.

Is the AVIF file bigger or smaller than the PGM?

The AVIF will typically be a fraction of the PGM's size. Use the SD preset to cut both the dimensions and the file size.

Is my PGM uploaded to a server?

No. The PGM is converted entirely in your browser, so the file never leaves your device and nothing is stored online.