Image Formats Compared
Twenty-eight image formats, ranked by file size and quality using the same three real photographs. Every number below is measured, not estimated.
There are dozens of image formats, but only a handful are worth using for any given job. This page ranks twenty-eight of them by the two things that actually matter: how small the file is, and how much quality survives. Every figure comes from encoding the same three real photographs, not from estimates.
Method: each photo was saved as a lossless PNG, then converted to every format below. Size is the average output as a percentage of that PNG. Quality is PSNR against the original in decibels, where higher is closer to the source and lossless formats are pixel-identical.
How were the image format numbers measured?
Three real photographs (a detailed close-up, a landscape, and a mixed-content shot) were each saved as a lossless PNG to serve as the reference. Every format was then encoded from that same PNG with FFmpeg 7.1, and the output measured for size and PSNR.
ffmpeg -i photo.png -c:v libwebp -quality 80 out.webpThe results below are the average across the three photos. Real photographs compress very differently from synthetic test patterns, so using actual photos keeps the numbers honest.
- AVIF produced the smallest files at 4% of the PNG size, followed by WEBP at 5%, both well ahead of JPEG.
- Among lossless formats, FFV1 was dramatically the most efficient at 31% of PNG, far better than PNG itself, JPEG-LS, QOI or MagicYUV.
- The uncompressed and RLE formats (BMP, PPM, PAM, DPX, XWD, TGA, PCX, SGI, SUN) are all LARGER than PNG on photos, and EXR was nearly ten times larger, because none of them compress photographic detail well.
| Format | Type | Size vs PNG | Quality (PSNR) | Best For | Support | Learn |
|---|---|---|---|---|---|---|
| PNG | Lossless | 100% (baseline) | Identical | Logos, screenshots, transparency | Universal | |
| APNG | Lossless | 100% (same as PNG) | Identical | Animated PNG with transparency | Modern browsers | |
| JPEG | Lossy | 9% | Excellent (51.3 dB) | Photos, web, sharing | Universal | |
| WEBP | Lossy | 5% | Very good (43.8 dB) | Modern web images | All modern browsers | |
| AVIF | Lossy | 4% | Very good (41.0 dB) | Smallest web images | Modern browsers | |
| JP2 | Lossy | 14% | Very good (41.2 dB) | Medical, archival imaging | Niche | |
| JPEG-LS | Lossless | 71% | Identical | Lossless medical imaging | Niche | |
| Lossless-JPEG | Lossless | 84% | Identical | Legacy lossless JPEG | Niche | |
| GIF | Lossy (256c) | 32% | Poor (20.9 dB) | Simple animation only | Universal | |
| BMP | Uncompressed | 238% (larger) | Identical | Legacy Windows apps | Windows | |
| TIFF | Lossless | 212% (larger) | Identical | Print, archiving, editing | Broad, not web | |
| TGA | Uncompressed | 153% (larger) | Identical | Game textures, legacy 3D | Niche | |
| PCX | Lossless (RLE) | 189% (larger) | Identical | Legacy DOS-era images | Legacy | |
| PPM | Uncompressed | 238% (larger) | Identical | Programming intermediates | Toolchains | |
| PGM | Grayscale raw | 79% | Grayscale only | Grayscale intermediates | Toolchains | |
| PBM | 1-bit mono | 10% | Poor (7.8 dB) | 1-bit black-and-white | Toolchains | |
| PAM | Uncompressed | 238% (larger) | Identical | Uncompressed with alpha | Toolchains | |
| SGI | Lossless (RLE) | 171% (larger) | Identical | Legacy SGI workstations | Legacy | |
| SUN | Lossless (RLE) | 212% (larger) | Identical | Legacy Sun systems | Legacy | |
| XWD | Uncompressed | 238% (larger) | Identical | X11 screen dumps | Legacy Unix | |
| XBM | 1-bit mono | 60% | Poor (7.8 dB) | 1-bit X11 icons | Legacy Unix | |
| DPX | Cinema raw | 238% (larger) | Identical | Film and cinema pipelines | Pro cinema | |
| EXR | HDR float | 954% (larger) | Identical | VFX, HDR compositing | Pro VFX | |
| HDR | HDR | 180% (larger) | Excellent (51.0 dB) | HDR lighting, environment maps | 3D / VFX | |
| QOI | Lossless | 83% | Identical | Fast lossless encode/decode | Emerging | |
| FFV1 | Lossless | 31% | Identical | Lossless video/image archiving | FFmpeg, archives | |
| MagicYUV | Lossless | 67% | Identical | Fast lossless capture | Editing tools | |
| WBMP | 1-bit mono | 10% | Poor (7.8 dB) | Old WAP phones (mono) | Obsolete |
Sizes are the average across three real photos, relative to the lossless PNG of each. Quality is PSNR against the source; lossless formats are pixel-identical. Your own results vary with the image and encoder settings.
Convert any image format free
Pick a format above, or drop your file into our in-browser converter. Nothing uploads to a server.
Open the Image ConverterReferences
Frequently Asked Questions
Which image format gives the smallest file?
On these three photographs AVIF was the smallest at 4% of the lossless PNG, with WEBP next at 5%. JPEG came in at 9%. All three are lossy, so they reach those sizes by discarding detail you are unlikely to notice.
Which lossless image format compresses best?
FFV1 was the most efficient lossless format at 31% of the PNG size. MagicYUV followed at 67%, JPEG-LS at 71%, QOI at 83% and lossless JPEG at 84%. PNG itself is the 100% baseline, and TIFF came out larger than PNG on photographs.
Why are BMP, PPM and TIFF files bigger than PNG?
Those formats either store pixels uncompressed or use run-length encoding, which does almost nothing on photographic detail. BMP, PPM, PAM, XWD and DPX all measured 238% of the PNG, TIFF and SUN 212%, PCX 189% and SGI 171%.
Is JPEG still worth using?
Yes. JPEG recorded the highest quality of any lossy format in the test at 51.3 dB PSNR, while still landing at 9% of the PNG size, and it is the one lossy format supported literally everywhere. AVIF and WEBP produce smaller files but scored 41.0 dB and 43.8 dB.
Why did EXR come out nearly ten times larger than PNG?
EXR stores floating-point HDR data rather than ordinary 8-bit pixels, so it is carrying far more information per pixel. It measured 954% of the PNG. That makes it the right choice for VFX work and the wrong choice for a web image.
What does PSNR mean in this comparison?
PSNR is peak signal-to-noise ratio, measured in decibels against the original photograph. Higher means closer to the source. Lossless formats are pixel-identical so no figure applies to them, while GIF, PBM, XBM and WBMP fall to 20.9 dB and 7.8 dB because they throw away color.
Which format should I pick for a photo on a website?
Use AVIF or WEBP if you can accept that older browsers may not display them, since they measured 4% and 5% of the PNG size. Use JPEG when universal support matters. Keep PNG for logos, screenshots and anything needing transparency.
Can I reproduce these numbers myself?
Yes. Each photo was saved as a lossless PNG reference, then encoded to every format with FFmpeg 7.1 and measured for output size and PSNR. The source files were three real photographs of roughly 1.5 to 3.9 MB each as PNG.