Format comparisons usually end with “AVIF is smallest, use AVIF”. Size is the easiest thing to measure and often the least important thing about the choice. Here are the numbers first, then the cases where the smallest file is the wrong file.
The measured part
One photo — Track on Fremington Edge by Kreuzschnabel (CC BY-SA 3.0) — resized to 2048 px wide, then encoded three ways on the same machine: JPEG and WebP by Chrome 153's built-in encoders, AVIF by the WebAssembly encoder this site uses in JPG to AVIF.
| Format | Size | vs JPEG |
|---|---|---|
| JPEG, quality 80 | 734 KB | — |
| WebP, quality 80 | 626 KB | −15% |
| AVIF, default setting | 583 KB | −21% |
Those are honest gains, not the 50% figures that get quoted. Large savings from AVIF are real, but they show up mostly on flat graphics, illustrations and images with large smooth areas — not on a detailed landscape, where every format has to spend bytes on grass and stone. Treat “AVIF is half the size” as a claim about the best case, not about your photo.
What each format is for
| Format | Best at | Cannot do |
|---|---|---|
| JPEG | Photographs; the format every device, printer and form accepts | Transparency; sharp text and flat colour without artefacts |
| PNG | Screenshots, logos, line art, anything with text or hard edges; lossless; transparency | Compact photographs — a PNG photo is typically 3–5× a JPEG |
| WebP | Web images: smaller than JPEG, does transparency and animation | Reliable support outside browsers — some desktop software and printers still refuse it |
| AVIF | The smallest files for web delivery, especially flat graphics; transparency; wide colour | Being created anywhere but a browser or a modern encoder; slow to encode |
The rule that decides most cases
Ask where the file is going, not which format is best in the abstract:
- Someone else's inbox, a form, a print shop, an official application: JPEG. It is the only format you can send without wondering whether the other end can open it. Passport and visa photo uploads in particular expect JPEG.
- Your own web page: WebP, with AVIF if you can serve a fallback. Both are supported by every current major browser; the question is what happens for the visitor whose browser is not current, and whether your publishing tool accepts the format at all.
- A screenshot of text, a logo, a diagram: PNG. JPEG turns crisp edges into a smear of artefacts, and the file is often larger for this kind of image because sharp transitions are exactly what JPEG spends bytes on.
- Anything with transparency: PNG, WebP or AVIF. Converting a transparent image to JPEG fills the transparent areas with a solid colour — usually white, sometimes black — and the transparency is gone for good.
A detail nobody mentions: browsers can read AVIF but not write it
Every current major browser displays AVIF. None of them can create one from a canvas: ask a browser to encode AVIF and it quietly hands back a PNG instead, with no error to tell you it substituted the format. We hit this while building the converters on this site and had to check the returned file's type rather than trust the request.
That is why every browser-based AVIF converter, including this one, ships a WebAssembly encoder of its own — roughly three megabytes that has to be downloaded before the first conversion. It is also why AVIF encoding is noticeably slower than JPEG or WebP: you are running a video codec's intra-frame encoder on a still image.
Converting between formats: what is kept and what is lost
| Conversion | What happens |
|---|---|
| PNG → JPEG | Transparent areas get filled with a colour you choose; file usually shrinks a lot; edges of text soften |
| JPEG → PNG | File usually grows several times over. PNG is lossless, but it cannot undo the JPEG artefacts already baked in |
| JPEG → WebP / AVIF | Smaller file, but a second round of lossy encoding on top of the first. Fine for publishing, not for archiving |
| Anything → JPEG | Metadata, animation and transparency are dropped; colour profile may be flattened to sRGB |
| HEIC → JPEG | The usual reason: HEIC is what iPhones save and what most Windows software cannot open |
One rule covers all of them: never convert your only copy. Lossy formats cannot be reversed, and a conversion made to satisfy one website will still be the file you have in five years.
Quality numbers are not comparable across formats
“Quality 80” in JPEG and “quality 80” in WebP are different settings on different scales; they only look alike. In the measurement above, both were set to 80 and WebP came out 15% smaller — which tells you about the encoders' defaults, not that WebP 80 and JPEG 80 look identical. If you are matching quality rather than a number, compare the two results side by side at full size, and pick by eye.
The same caution applies to any comparison table on the web, including this one: it is one photo, one encoder version, one set of settings. It is a starting point, not a law. Convert Image Format will do the same comparison with your own image in a few seconds, and nothing is uploaded while you try it.