Image Compression Tested

Image compression tested at the same near-identical quality, with real-photo file sizes measured to show which formats compress smallest.

A measured comparison of how small each image format compresses at equal quality.

Real Compression Benchmark

Image Compression Tested

Every compression format taken to the same near-identical quality on three real photographs, then measured. The smaller the number, the better it compresses.

69Formats Accepted
16Compression Engines
3Real Photos

"Which format compresses smallest" only means something at equal quality. So we did exactly that: took three real photographs and compressed each format down to the same near-identical quality (about 40 dB PSNR, where the difference is very hard to see), then measured the file that came out. Formats that only reduce size by throwing quality away, like GIF and WBMP, are shown with the quality they actually keep.

Efficient / broad support Limited compatibility Obsolete or restricted

The compressor accepts 60+ image formats, but most of those share one of these compression engines. The 69 collapse to the 16 distinct behaviours below: the JPEG family (JPEG, JPE, JFIF, JFI, JIF, JPS) is one codec measured once, while dozens of formats (BMP, TGA, PPM, RGB, YUV, SUN, SGI and similar raw or 1-bit types) store pixels without real compression and only get larger, so testing them separately would add rows that all say the same thing. What follows is every genuinely different way an image can be compressed.

Method: each photo started as a lossless PNG. For the lossy formats we searched the quality setting for the smallest file that still held 40 dB. Lossless formats report their fixed size, since they cannot trade quality for size.

Tested, not guessed

How were the image compression sizes measured?

Three real photographs were saved as lossless PNG references. For each lossy format, FFmpeg 7.1 encoded the photo repeatedly, searching for the lowest quality setting that still measured at least 40 dB PSNR against the source, and recorded that file size. Lossless formats were encoded once. Palette (GIF) and one-bit (WBMP) formats were encoded once and their real quality measured.

Source files3 real photos, ~1.5 to 3.9 MB each as PNG
Commandffmpeg -i photo.png -c:v libwebp -quality 70 out.webp # tuned to hit 40 dB

The results are the average across the three photos as a percentage of the PNG source. A brand-new photo compresses far more than one that is already a JPEG.

  • WEBP produced the smallest near-identical file at 2% of the PNG, with JPEG and AVIF close behind at 3% and HEIC at 9%.
  • Among lossless formats, FFV1 (31%) and WEBP lossless (34%) were the most efficient, well ahead of QOI (83%) and TIFF (no gain over PNG).
  • GIF and WBMP look small (32% and 10%) only because they discard color or drop to black and white, so their quality falls far below the rest.
FormatTypeSmallest at equal qualityQuality heldVerdictNotesLearn
JPEGLossy3%40.1 dBExcellent all-rounderWorks everywhere
WEBPLossy2%40.1 dBSmallest for the webAll modern browsers
AVIFLossy3%40.3 dBSmallest, newest supportNewer browsers
HEICLossy9%40.2 dBSmall, Apple-firstApple ecosystem
JP2Lossy12%40.3 dBNiche, much largerLimited support
PNGLossless100% (baseline)IdenticalUniversal losslessBaseline reference
APNGLossless100% (baseline)IdenticalPNG size, adds animationSame size as PNG
WEBP-LLLossless34%IdenticalSmaller lossless, webAll modern browsers
FFV1Lossless31%IdenticalBest lossless ratioArchival, not web
QOILossless83%IdenticalFast, modest ratioNiche, fast encode
TIFFLossless100% (baseline)IdenticalNo gain over PNG herePrint, editing
JPEG-LSLossless71%IdenticalSolid lossless ratioMedical, niche
Lossless-JPGLossless84%IdenticalWeak, largely obsoleteLegacy
MagicYUVLossless67%IdenticalGood ratio, video rootsCapture, editing
GIFPalette32%20.9 dBSmall but drops color256 colors only
WBMP1-bit10%7.8 dBTiny but black & whiteLegacy mobile

Sizes are the average across three real photos, relative to the lossless PNG of each, at roughly equal quality where the format allows it. GIF and WBMP show the quality they actually keep. Your own results vary with the image and settings.

Compress your images free

Pick a format above, then drop your file into our in-browser compressor. Nothing uploads to a server.

Open the Image Compressor

References

  1. Image file type and format guide - MDN Web Docs, Mozilla
  2. Portable Network Graphics (PNG) Specification - W3C
  3. WebP Compression Techniques - Google Developers
  4. AV1 Image File Format (AVIF) - Alliance for Open Media
  5. ITU-T T.81: JPEG Standard - ITU
  6. FFmpeg Filters Documentation (psnr) - FFmpeg

Frequently Asked Questions

Which format compresses an image smallest at equal quality?

WEBP, at 2% of the lossless PNG while holding 40.1 dB PSNR. JPEG and AVIF both landed at 3%, at 40.1 dB and 40.3 dB. HEIC needed 9% to reach 40.2 dB and JP2 needed 12%.

Why compare formats at the same quality instead of the same setting?

Because "smallest file" is meaningless on its own: any format looks good if you let its quality collapse. Each lossy format here was searched for the lowest quality setting that still measured at least 40 dB PSNR, a level at which the difference is very hard to see, and then the resulting file size was recorded.

Why are GIF and WBMP shown separately?

They cannot hit 40 dB at all. GIF is limited to 256 colors and measured 20.9 dB, while WBMP is one-bit black and white and measured 7.8 dB. Their 32% and 10% sizes come from discarding color, not from compressing better.

Which lossless format should I use?

FFV1 was smallest at 31% of the PNG, with lossless WEBP very close at 34%. Both are far ahead of MagicYUV at 67%, JPEG-LS at 71% and QOI at 83%. TIFF and APNG showed no gain over PNG. For the web, lossless WEBP is the practical pick since FFV1 is an archival codec.

Why does the comparison show 16 rows when the converter accepts more formats?

Most of those formats share a compression engine. The JPEG family (JPEG, JPE, JFIF, JFI, JIF, JPS) is one codec, measured once, and dozens of raw or one-bit types such as BMP, TGA, PPM, RGB, YUV, SUN and SGI store pixels without real compression. Listing them separately would add rows that all report the same behaviour.

Will my own files compress this much?

Probably not by the same ratio. These figures start from a lossless PNG of a brand-new photograph, which has the most detail available to remove. A file that is already a JPEG has been compressed once and will shrink far less.

What is 40 dB PSNR in practical terms?

PSNR measures how close the compressed image is to the original in decibels, and higher is closer. At roughly 40 dB the difference from the source is very hard to see on a normal screen, which is why it was chosen as the equal-quality target for every lossy format here.

How were these sizes measured?

Three real photographs of about 1.5 to 3.9 MB each were saved as lossless PNG references. FFmpeg 7.1 encoded each lossy format repeatedly, searching for the lowest quality that still held 40 dB PSNR, while lossless formats were encoded once. Every figure is the average across the three photos.