JPG vs PNG vs WebP vs AVIF: File Sizes Measured on 24 Photos
The same 24 photos converted to all four formats with this site’s converter, with the file sizes, a similarity score for each, and when to use which.
By jpg-to.io ·
The short version
- Lossless PNG was by far the largest: a median of 848 KB per photo, about 10 times the JPG.
- At the converter’s starting settings the median photo was 81.8 KB as JPG (85%), 66.3 KB as WebP (85%) and 40.7 KB as AVIF (60%).
- At the same measured similarity as a JPG at 85%, WebP was 28% smaller and AVIF 38% smaller (medians). Both were smaller on all 24 photos.
- AVIF took the longest to make: a median of 263 ms per photo, against 6 ms for JPG, on the test machine.
- Choose by where the file is going: JPG when anything must be able to open it, WebP or AVIF for web pages, PNG for screenshots, line art and transparency.
What we measured
We took the 24 photos of the Kodak Lossless True Color Image Suite (each 768 × 512 or 512 × 768 pixels, lossless PNG) and converted every one to JPG, WebP, AVIF and PNG with the converter on this site, running in Chromium 141 on November 11, 2026.
That made 576 files. For each one we recorded the size in bytes and a similarity score (SSIM) against the original pixels, where 1.000 means identical. The converter was not changed for the test, and no setting was tuned per photo.
One thing to know before the numbers: this site uses your browser’s own encoder where it has one. In this run JPG, PNG and WebP came from Chromium’s encoders and AVIF from the site’s WebAssembly codec, so another browser can produce somewhat different sizes. The limits of the test and the full method are further down.
File size at the starting settings
These are the sizes you get when you add a photo and change nothing. The quality slider starts at 85% for JPG, 85% for WebP and 60% for AVIF on pages that set no value of their own. PNG has no quality setting, because it is lossless.
| Format | Setting | Median size | Smallest to largest | Against JPG | Similarity (SSIM) |
|---|---|---|---|---|---|
| PNG | lossless | 848 KB | 677 KB to 1 MB | 10× the size | 1.000 |
| JPG | 85% | 81.8 KB | 57 KB to 148 KB | baseline | 0.968 |
| WebP | 85% | 66.3 KB | 36.6 KB to 144 KB | 19% smaller | 0.974 |
| AVIF | 60% | 40.7 KB | 20 KB to 110 KB | 50% smaller | 0.962 |
WebP at 85% was 19% smaller than JPG at 85% and scored slightly higher on similarity. AVIF at 60% was 50% smaller and scored slightly lower.
File size at equal measured quality
A fair comparison holds quality still. For each photo we took the similarity score of the JPG at 85% and worked out the size at which WebP and AVIF reach the same score, by interpolating between the two nearest settings we measured.
| Format | Median | Range across the photos | Photos where it was smaller |
|---|---|---|---|
| WebP | 28% smaller | 13% to 34% smaller | 24 of 24 |
| AVIF | 38% smaller | 31% to 49% smaller | 24 of 24 |
At the median that is 28% saved with WebP and 38% with AVIF. Our WebP median of 28% sits inside the range MDN’s format guide gives for lossy WebP, “on average 25–35% smaller than JPEG images”.
How the quality setting changes the size
The slider trades bytes for detail. These are the medians at every setting we measured.
| Quality | JPG size | JPG similarity | WebP size | WebP similarity |
|---|---|---|---|---|
| 50% | 37.9 KB | 0.926 | 29.8 KB | 0.930 |
| 60% | 43.7 KB | 0.936 | 34.3 KB | 0.940 |
| 70% | 52.9 KB | 0.947 | 39.5 KB | 0.948 |
| 75% | 58.9 KB | 0.953 | 42.4 KB | 0.952 |
| 80% | 68.4 KB | 0.961 | 52.5 KB | 0.964 |
| 85% | 81.8 KB | 0.968 | 66.3 KB | 0.974 |
| 90% | 105 KB | 0.978 | 91.6 KB | 0.983 |
| 95% | 152 KB | 0.988 | 136 KB | 0.991 |
| Quality | AVIF size | AVIF similarity |
|---|---|---|
| 30% | 10.2 KB | 0.865 |
| 40% | 16.2 KB | 0.909 |
| 50% | 25.8 KB | 0.939 |
| 60% | 40.7 KB | 0.962 |
| 70% | 53 KB | 0.972 |
| 80% | 70.6 KB | 0.981 |
| 90% | 121 KB | 0.992 |
The numbers on the three sliders are not one scale. AVIF at 60% scored closest to JPG at 80% (0.962 against 0.961), at 60% of that JPG’s size.
Each step up costs more than the one before. Going from 85% to 95% made the median JPG 86% bigger for a similarity gain of 0.020.
PNG: exact pixels, large files
PNG keeps every pixel, which is why its similarity score is exactly 1. For photos that costs a lot: the median PNG was 10 times the size of the JPG at 85%.
PNG size also depends on the encoder. The browser’s encoder favours speed: its files were 27% to 59% larger than the same photos as distributed in the test set (a median of 848 KB against 605 KB), with identical pixels. If you need a small PNG, Compress PNG shrinks one by reducing its colours, which is no longer lossless; for a photo, JPG or WebP is usually the better answer.
PNG earns its place for screenshots, diagrams, line art and anything that needs a transparent background. MDN’s format guide gives the same advice: PNG is “better for screenshots, diagrams, and line art”, while JPEG “is particularly useful for photographs”. We did not measure screenshots or graphics here; this test is photos only.
Speed: AVIF takes longer
Converting one test photo took a median of 6 ms to JPG, 24 ms to WebP and 263 ms to AVIF on the test machine (Apple M5 Pro). These photos are small, 0.4 megapixels each; a 12-megapixel phone photo has about 31 times as many pixels, so expect AVIF to take correspondingly longer. We did not time large photos in this run.
For photos above 4 megapixels the converter switches its AVIF codec to a faster preset. This test did not exercise it, so AVIF files made from large photos may come out somewhat larger than these ratios suggest.
Which format to use
- A form, an email, a printer or an older program has to open it: use JPG. MDN lists it as supported by every version of Chrome, Edge, Firefox, Opera and Safari. PNG to JPG, WebP to JPG, AVIF to JPG.
- Photos on a website: WebP. At the same score it was smaller than JPG on all 24 photos here, and MDN lists Chrome, Edge, Firefox, Opera and Safari as supporting it (on a Mac, Safari 14 or later on macOS Big Sur or later). JPG to WebP, PNG to WebP.
- The smallest photos, where you control how they are shown: AVIF. It was the smallest in this test, the slowest to make, and the newest: MDN gives Chrome 85, Edge 121, Firefox 93, Opera 71 and Safari 16.1 as the first versions with support and advises providing a fallback. JPG to AVIF, PNG to AVIF.
- Screenshots, logos, line art or a transparent background: PNG, or WebP, which also keeps transparency. JPG to PNG.
- You only need the file smaller, in the format it already has: Compress JPG, Compress PNG or Compress Image.
- You already have a JPG: converting it to WebP or AVIF saves space but cannot bring back detail the JPG has lost, and converting it to PNG only makes the file bigger.
Limits of this test
- 24 photos, all 768 × 512 or 512 × 768 pixels. Your photos will give different numbers, and a photo straight from a phone is many times larger.
- One browser. The converter uses the browser’s encoder when it has one, so JPG, WebP and PNG sizes can differ in Firefox or Safari. Where a browser cannot encode WebP or AVIF itself, the site’s WebAssembly codec does it.
- One similarity score. SSIM on brightness does not measure colour, and it is no substitute for looking at the picture.
- The converter’s standard encoder settings only. We did not test lossless WebP or AVIF, full-resolution colour (4:4:4) JPG, or animated images.
- Photos only: no screenshots, text or flat graphics, which behave differently.
Method in full
- Test set: Kodak Lossless True Color Image Suite, 24 files, 768 × 512 or 512 × 768 pixels, from r0k.us. The page that hosts them says that, to its maintainer’s understanding, the images “have been released by the Eastman Kodak Company for unrestricted usage”. We do not host the photos.
- Browser: Chromium (Playwright, headless), version 141.0.7390.37, on November 11, 2026.
- Converter: this site’s engine, unmodified, with its standard options: no resize, metadata removed, and only the quality changed between runs.
- Encoders in this browser: JPG, PNG, WebP from the browser; AVIF from the site’s WebAssembly codec (@jsquash/avif 2.1.1).
- Settings measured: JPG and WebP at 50, 60, 70, 75, 80, 85, 90, 95%; AVIF at 30, 40, 50, 60, 70, 80, 90%; PNG lossless.
- Similarity: SSIM on luma (BT.601), 8 × 8 windows every 4 px, mean over windows; decoded by the same browser.
- Equal-quality sizes: for each photo, a straight line between the two measured settings whose scores bracket the target score.
- Sizes are the bytes of the output file, shown with 1 KB = 1,024 bytes. Times are decode plus encode for one photo.
Sizes of all 24 photos at the starting settings
| Photo | As distributed (PNG) | PNG from the converter | JPG 85% | WebP 85% | AVIF 60% |
|---|---|---|---|---|---|
| kodim01 | 719 KB | 952 KB | 121 KB | 110 KB | 79.9 KB |
| kodim02 | 604 KB | 817 KB | 74.5 KB | 55.4 KB | 33.6 KB |
| kodim03 | 491 KB | 755 KB | 60.3 KB | 40.5 KB | 23.7 KB |
| kodim04 | 622 KB | 827 KB | 77.1 KB | 60.4 KB | 35.6 KB |
| kodim05 | 767 KB | 994 KB | 129 KB | 111 KB | 79.8 KB |
| kodim06 | 604 KB | 910 KB | 96.4 KB | 85 KB | 57.4 KB |
| kodim07 | 553 KB | 810 KB | 70.8 KB | 47 KB | 31 KB |
| kodim08 | 770 KB | 995 KB | 130 KB | 119 KB | 79.6 KB |
| kodim09 | 569 KB | 799 KB | 63.9 KB | 44 KB | 24.3 KB |
| kodim10 | 580 KB | 813 KB | 70.4 KB | 50.2 KB | 27.6 KB |
| kodim11 | 606 KB | 863 KB | 90.7 KB | 76.6 KB | 50.7 KB |
| kodim12 | 519 KB | 789 KB | 66.2 KB | 48 KB | 27.5 KB |
| kodim13 | 803 KB | 1 MB | 148 KB | 144 KB | 110 KB |
| kodim14 | 676 KB | 942 KB | 111 KB | 98.6 KB | 68.2 KB |
| kodim15 | 598 KB | 793 KB | 70.2 KB | 53.3 KB | 31.9 KB |
| kodim16 | 522 KB | 832 KB | 75.3 KB | 60.1 KB | 38.3 KB |
| kodim17 | 588 KB | 822 KB | 75.4 KB | 55 KB | 35.1 KB |
| kodim18 | 763 KB | 970 KB | 109 KB | 102 KB | 64.9 KB |
| kodim19 | 656 KB | 880 KB | 86.5 KB | 72.3 KB | 43.2 KB |
| kodim20 | 481 KB | 677 KB | 60 KB | 44.9 KB | 28.4 KB |
| kodim21 | 622 KB | 899 KB | 88.2 KB | 73.2 KB | 49.3 KB |
| kodim22 | 686 KB | 901 KB | 90.9 KB | 80.6 KB | 49.5 KB |
| kodim23 | 545 KB | 765 KB | 57 KB | 36.6 KB | 20 KB |
| kodim24 | 690 KB | 881 KB | 105 KB | 91.5 KB | 64.3 KB |
Questions and answers
Is WebP always smaller than JPG?
In this test, at the same slider value, WebP was the smaller file on 24 of 24 photos at 80%, 24 of 24 photos at 85% and 23 of 24 photos at 90%, and at equal similarity to a JPG at 85% it was smaller on all 24 photos. That is a result on these photos, not a rule.
Does converting a JPG to WebP or AVIF improve its quality?
No. A JPG has already discarded detail, and no later conversion can bring it back. Converting to WebP or AVIF can make the file smaller; it re-compresses the picture, so use a high quality setting if you care about how it looks.
Why is a PNG of a photo so much larger than the JPG?
PNG stores every pixel exactly, and photos are full of fine variation that cannot be squeezed without loss. In this test the median PNG was 10 times the size of the JPG at 85%.
Which browsers can show WebP and AVIF?
According to MDN’s image format guide (read on November 11, 2026): WebP is supported by Chrome, Edge, Firefox, Opera and Safari, with Safari on a Mac needing version 14 or later on macOS Big Sur or later. AVIF is supported from Chrome 85, Edge 121, Firefox 93, Opera 71 and Safari 16.1.
Will my photos give the same numbers?
No. These are medians over 24 small test photos in one browser. Detailed, noisy photos compress less than smooth ones, larger photos behave differently, and other browsers use other encoders. Convert one of your own photos to see its real sizes.
Sources
- Kodak Lossless True Color Image Suite (r0k.us) (read November 11, 2026)
- MDN Web Docs: Image file type and format guide (read November 11, 2026)