Chip in

PGM to AVIF converter

Convert PGM to AVIF in seconds, free and unlimited. No upload, no sign-up, no watermark: your image never leaves your device.

Last updated

Quick answer: To convert PGM to AVIF, add the PGM file to the iHateFiles PGM to AVIF converter and press Convert. The conversion runs in your browser, so the file is never uploaded, and it is free with no sign-up, watermark or size limit. AVIF supports transparency, which PGM never had. That helps if you plan to cut the background out afterwards.

Should you convert PGM to AVIF?

Do this for photographs, where AVIF saves a great deal of space for a difference almost nobody can see. Keep the PGM if the image is a screenshot, a logo, or anything with text or hard edges in it.

PGM keeps everything, AVIF does not

PGM stores the image exactly. AVIF discards detail to save space, and the quality setting on this page decides how much. This is the right trade for photographs and the wrong one for screenshots and line art, where PGM edges stay crisp and AVIF smudges them.

AVIF supports transparency, but there is none to recover

AVIF can store an alpha channel and PGM cannot, so nothing is gained here automatically. The result is fully opaque. Transparency has to be cut in an editor; no converter can work out which parts of a PGM were meant to be see-through.

Expect a much smaller file

A PGM of a photograph is routinely several times the size of the same picture as AVIF. That saving is the reason to do this, and on a photograph it costs very little that anyone will notice.

PGM and AVIF side by side

 PGMAVIF
CompressionLosslessLossy
TransparencyNoYes
AnimationNoNo
Written hereYesYes

What usually goes wrong

About the PGM. Converting a colour image to PGM throws the colour away for good. Keep the original if you might want it back.

About the AVIF. Reading AVIF is nearly universal; writing it is not. A browser without an encoder quietly hands back a PNG instead of refusing, so the conversion looks as though it worked. Current Chrome on macOS is one of them. This site checks for a real encoder first and says so when there is none.

How to convert PGM to AVIF

  1. Add your PGM file. It is read from your disk and stays there.
  2. Check the settings. The output format is already set to AVIF.
  3. Press convert and the AVIF file is saved back to your device.

Convert AVIF to PGM instead

About PGM files

Questions

How do I convert PGM to AVIF?

Open this page, add your PGM file, and press convert. The file is decoded and re-encoded by your own browser and saved back to your device. Nothing is uploaded.

Is this PGM to AVIF converter free?

Yes, completely. There is no account, no sign-in, no watermark and no daily limit, because there is no server doing the work. Your own device does it.

Are my files uploaded anywhere?

No. There is no upload endpoint. The conversion runs inside this browser tab, so your file never leaves your device. You can open your browser's network panel and watch: nothing carrying your file is sent.

Is there a file size limit?

No fixed limit. Because the work happens on your machine there is no server quota. The only ceiling is your own device's memory, which for video means very large files may be slow.

Will converting to AVIF lose quality?

AVIF is a lossy format, so some detail is discarded. The quality control on this page decides how much. The default is set high enough that most people cannot see the difference.

Can I convert several PGM files at once?

Yes. Add as many as you like and they are converted one after another, then offered as a single ZIP.