Most format advice is written as a ranking: WebP beats JPEG, AVIF beats WebP, PNG is for transparency. Rankings are easy to remember and frequently wrong, because the right format depends on what is inside the picture, not on what the picture is currently called.
So we stopped arguing and measured. We ran the same published test files through 38 of our own converters and recorded every output byte — 98 measurements in total. This page is the practical reading of that table. Every number below came out of a real conversion in a real browser, and you can download the same test files and re-run it.
Step one: what is in your image?
Before choosing a format, put your file in one of these five buckets. This single question predicts the result better than any format ranking.
| Bucket | How to tell | Typical content |
|---|---|---|
| Photograph | Zoom in — edges are soft, there is grain everywhere | Camera shots, product photos |
| Screenshot | Large flat areas, hard 1-pixel borders, text | App and web captures |
| Flat illustration | A handful of solid colours, no gradients | Charts, diagrams, simple art |
| Logo with transparency | Few colours, hard edges, checkerboard background | Icons, badges, stickers |
| Scan | Came from a scanner, usually huge and uncompressed | TIFF and BMP documents |
Photographs: JPG or WebP, and nothing else
This is the one bucket where the popular advice holds. Our test photo weighed 1.88 MB as a PNG. Converting it dropped it to 288.4 KB as JPG (−85%) and 303.1 KB as WebP (−84%). If it started life as a 2.75 MB uncompressed BMP or TIFF scan, JPG took it to 288.4 KB — a 90% cut.
What the numbers warn against is going the other way. A photograph moved into a lossless format explodes:
- JPG to PNG: 330.2 KB → 2.07 MB (+542%)
- WebP to PNG: 351.5 KB → 2.15 MB (+527%)
- JPG traced to SVG: 330.2 KB → 7.49 MB (+2224%)
None of that recovers quality. Whatever the lossy encoder discarded is already gone; the lossless format simply stores what remains, artefacts included, at full price. Convert a photo to PNG only when you are about to edit it.
Already have a JPG and want it smaller? Re-encoding to WebP saved only 9% on our photo (330.2 KB → 301.9 KB), because the JPEG was already reasonably efficient. Compressing it did better at −46%, and resizing it to 800 px wide halved it.
Screenshots: WebP, and JPG is a trap
Here the ranking inverts and it catches people out. Our 18.0 KB PNG screenshot became 43.5 KB as JPG — 142% larger. JPEG has to spend bits blurring the hard borders that PNG stored almost for free, so you pay more and the text gets fuzzy.
WebP is the right answer: the same capture went to 7.3 KB (−59%). From an oversized JPG screenshot the saving was dramatic, 45.3 KB → 7.3 KB (−84%). And if you are stuck with a 2.75 MB BMP capture, BMP to WebP produced 7.3 KB — a rounding-error fraction of the original.
The trap to avoid is the reverse trip. Our 7.3 KB WebP screenshot converted to PNG came out at 82.3 KB, up 1034%, because PNG must faithfully store the compression noise WebP introduced.
Flat illustrations: WebP wins, but JPG is not the disaster you expect
Flat art compresses well almost everywhere. Our 34.7 KB illustration went to 10.2 KB as WebP (−71%) and, surprisingly, 24.1 KB as JPG (−30%) — a real saving, unlike the screenshot case, because large solid areas give JPEG little to blur. If the artwork is destined to be an icon, PNG to ICO took it to 1.3 KB (−96%).
Tracing to SVG is the tempting option that usually backfires: the same illustration became 117.0 KB (+238%), because every region of colour turns into a path.
Logos with transparency: never JPG
JPG has no alpha channel, so transparency is filled with white — our transparent test logo came back with a white box behind it, on every JPG conversion. What worked:
- PNG to ICO: 28.8 KB → 951 B (−97%)
- PNG traced to SVG: 28.8 KB → 1.7 KB (−94%), and infinitely scalable
- PNG to WebP: 28.8 KB → 7.5 KB (−74%), transparency kept
That SVG result is the one case in our whole table where tracing wins outright, and it is exactly the case tracing was designed for: few colours, hard edges.
One honest exception. A transparent GIF at 4.3 KB grew to 5.4 KB as WebP (+27%). Against a file that small, a modern codec has almost nothing left to reclaim. It is still far better than the alternatives — the same GIF was 26.0 KB as PNG (+507%) and 17.3 KB as JPG (+304%).
Scans: the format depends on what was scanned
Every one of our BMP and TIFF test files was exactly 2.75 MB, because both store raw pixels. The savings are enormous either way, but the right target flips with the content:
| What was scanned | Best target | Result |
|---|---|---|
| A photograph | JPG | 2.75 MB → 288.4 KB (−90%) |
| Text or line art | PNG | 2.75 MB → 22.9 KB (−99%), lossless |
That second row is the useful one: for a scanned document, TIFF to PNG is both smaller than the JPG version and pixel-exact. Scanned photographs are the opposite — PNG only reached 2.25 MB (−18%), because PNG cannot compress photographic grain.
Vectors and modern codecs: two special cases
Coming from SVG, the file size is decided by the width you pick, not by the format. Our 574-byte test SVG at the default 512 px width produced 6.6 KB as WebP, 13.2 KB as JPG and 17.9 KB as PNG. Decide the largest size you actually need first.
Coming from AVIF, you are converting away from the most efficient codec in the table, so every exit costs. Our 1200 × 800 UI capture fits into 1,472 bytes as AVIF; the same image is 6.9 KB as WebP (+378%), 43.7 KB as JPG (+2942%) and 36.5 KB as PNG (+2442%). Keep the AVIF and serve a WebP fallback rather than replacing it.
PDFs: weight follows content, not page count
The PDF numbers make one point over and over. From our five-page test document, extracting page 3 — a full-page photograph — gave 331.2 KB, while extracting page 4, plain text, gave 1.4 KB. Deleting that text page changed the file from 334.1 KB to 333.3 KB, essentially nothing; deleting the photo page left 3.4 KB.
So: merging does not shrink anything (336.9 KB in, 336.0 KB out) and rotating changes the size not at all (334.1 KB either way, because it only sets a flag). If you need a smaller PDF, compressing halved ours to 167.6 KB — it re-encodes the images and leaves text alone, which also means a text-only PDF has almost nothing to squeeze.
The three things the measurements taught us
Lossy to lossless always costs more than people expect. Not 20% more — 500% to 2700% more. If you find yourself converting to PNG, check that you actually need lossless editing, transparency or pixel-exactness. Those are good reasons. “Better quality” is not one, because the quality is already gone.
“Which format is smaller” is an unanswerable question. WebP beat its input on PNG, JPG, BMP and TIFF sources — then a 4.3 KB transparent GIF grew 27%. The same JPG-to-PNG conversion costs +61% on a screenshot and +542% on a photograph. Content decides; the format label does not.
Measuring contradicted our own published advice five times. We had written that PNG comes out smaller than JPG from a PDF page (it does not, on text pages), that GIF to PNG grows “a little” (+125% and +507%), that WebP from a GIF is smaller than both alternatives (+27% on the logo), that AVIF to WebP is “a touch larger” (+92% to +378%), and that WebP never came out larger than its input. All five are corrected now. That is the reason the Conversion Lab exists, and why the test files are published: so the numbers can be checked rather than believed.