Benchmark
The JPEG quality slider, measured: what each setting actually buys you
Ten quality settings, five image types, three metrics. Where the size curve accelerates, where quality stops improving, and the settings we would actually ship.
At a glance
- Five image types, ten JPEG quality settings, 50 encodes: every size, PSNR and SSIM value is published as CSV.
- On a photographic image, going from quality 75 to quality 90 tripled the file (141.2 KB to 414.7 KB) and moved SSIM by 0.005.
- At quality 95 the photo's PSNR actually fell (38.0 dB versus 38.9 dB at quality 85) while the file grew to 952.8 KB.
- Screenshots barely respond to quality at all: 170.9 KB at quality 40 versus 752.0 KB at quality 95, with SSIM moving 0.917 to 0.934 and PSNR flat at 26.7 dB.
- Chroma subsampling at 4:2:0 cut file size by 29-32% with no measurable change on this corpus — with one important caveat about saturated colour.
The question the quality slider never answers
Every image tool has a JPEG quality slider, usually pre-set to 80 or 85, usually with no explanation. The understandable assumption is that the number is a fidelity dial: higher must be better, and if you care about your images you should move it up.
Measured across 50 encodes, that assumption costs people a great deal of bandwidth for very little image. The curve has a knee, it arrives earlier than the defaults suggest, and on some kinds of image the curve is flat in both directions — a slight quality increase that does nothing and a large file that does nothing with it.
What we measured
| Setting | Value |
|---|---|
| Encoder | Pillow 11.0.0 with libjpeg-turbo |
| Quality steps | 40, 50, 60, 65, 70, 75, 80, 85, 90, 95 |
| Chroma | 4:4:4 (no subsampling) unless stated |
| Images | photo 1600x1200, screenshot 1920x1080, flat art, gradient, product cutout |
| Metrics | file size, PSNR (dB), SSIM (0-1), bits per pixel |
| Date | 22 October 2026 |
The test images are generated by a script we publish, so the numbers can be reproduced exactly. They are synthetic: smooth gradients, a photographic texture, flat artwork, a UI screenshot and a cutout product shot.
Where the curve breaks: a photo
A photograph — the case JPEG was designed for — behaves like this.
| Quality | File size | PSNR | SSIM |
|---|---|---|---|
| 40 | 46.8 KB | 38.3 dB | 0.877 |
| 60 | 76.3 KB | 38.6 dB | 0.883 |
| 75 | 141.2 KB | 38.7 dB | 0.888 |
| 80 | 193.5 KB | 38.8 dB | 0.890 |
| 85 | 270.2 KB | 38.9 dB | 0.892 |
| 90 | 414.7 KB | 38.8 dB | 0.893 |
| 95 | 952.8 KB | 38.0 dB | 0.877 |
Read the last two rows again. Between quality 85 and quality 95 the file grows 3.5x — from 270.2 KB to 952.8 KB — and both metrics get worse. PSNR drops by 0.9 dB, SSIM drops from 0.892 to 0.877.
What is happening is that above a certain setting the encoder stops removing noise the eye never sees and starts preserving it, while the larger coefficient set forces coarser quantisation elsewhere. You are paying for detail you cannot perceive with bits taken from detail you can. The optimum on this image sits around quality 80 to 85 — exactly where most tools default, and only if you ignore the two ends of the slider.
Screenshots do not improve at all
The screenshot is the most instructive row in the data. Across the entire quality range, PSNR never moves off 26.7 dB.
| Quality | Screenshot size | PSNR | SSIM |
|---|---|---|---|
| 40 | 170.9 KB | 26.7 dB | 0.917 |
| 60 | 221.2 KB | 26.7 dB | 0.925 |
| 75 | 285.8 KB | 26.7 dB | 0.930 |
| 85 | 394.6 KB | 26.7 dB | 0.933 |
| 95 | 752.0 KB | 26.7 dB | 0.934 |
The file grows 4.4x from quality 40 to 95. PSNR does not care. SSIM crawls from 0.917 to 0.934, and the visible result is the same fuzzy ringing around black text on white that was there at quality 40 — JPEG's 8x8 block transform smears exactly the high-contrast, high-frequency edges that make up a UI.
The practical consequence: if your image is text, line art, a chart, a screenshot or a document scan, the quality slider is not the tool. Save it as PNG, or as a lossless WebP, and stop paying JPEG to blur your text. Our own workflow for that case is described in the compress-an-image guide.
Chroma subsampling: the setting nobody shows you
JPEG stores brightness at full resolution and colour at reduced resolution. At 4:2:0 the colour channels are quartered, which is what nearly every camera and phone does before you ever touch a slider.
| Image | Encoding | Quality | File size | PSNR | SSIM |
|---|---|---|---|---|---|
| Photo | 4:4:4 | 85 | 270.2 KB | 38.9 dB | 0.8921 |
| Photo | 4:2:0 | 85 | 183.5 KB | 38.9 dB | 0.8922 |
| Photo | 4:2:0 | 75 | 101.4 KB | 38.7 dB | 0.8877 |
| Screenshot | 4:4:4 | 85 | 394.6 KB | 26.7 dB | 0.9328 |
| Screenshot | 4:2:0 | 85 | 280.2 KB | 26.7 dB | 0.9328 |
Switching to 4:2:0 saved 32% on the photo and 29% on the screenshot with no measurable loss on these images. That caveat matters: our synthetic corpus is mostly grey and muted, and chroma subsampling is precisely what damages saturated red and blue detail, thin coloured text and sharp colour edges. If your image is a red logo on a green field, the savings come at a visible price. For photographs, which is what JPEG is for, 4:2:0 is the sensible default.
Recommended settings
| What you have | Format | Setting | Reason |
|---|---|---|---|
| Photograph for a web page | JPEG | quality 78-85, 4:2:0, resized first | Past quality 85 the size curve accelerates and the eye stops noticing |
| Photograph for a client or a print | JPEG | quality 85-92, 4:4:4 | Keeps colour edges clean for retouching and printing |
| Screenshot, chart, document scan | PNG or lossless WebP | not JPEG | Quality cannot fix block artefacts on text |
| Logo, icon, anything with transparency | PNG | not JPEG | JPEG cannot store alpha and will flatten it onto a matte |
| Archival master | PNG or TIFF | lossless | Every JPEG re-save loses a little more |
| "I need it under 100 KB" | JPEG | resize first, then quality 75-80 | Dimensions dominate the file size; see the dedicated guide |
The single most effective action for a large image is not touching quality at all. Halving both pixel dimensions quarters the pixel count, and a 1600x1200 photo at quality 85 (270.2 KB) is far heavier than the same content at 800x600 — the resize comparison page measures exactly how much of that comes from the dimensions and how much from the resampling method used.
Reproduce it
- corpus.zip — the six test images these numbers came from; unzip beside the script to reproduce them exactly
- study-b-jpeg-quality.csv — all 50 quality rows with size, PSNR, SSIM and bits per pixel
- study-b2-subsampling.csv — the subsampling comparison
- bench_kit.py and bench_kit.py — the corpus generator and the measurement script
- README.txt — how to run them
What this test does not cover
The corpus is synthetic and smoother than a real photograph, so absolute sizes will differ on your files while the shape of every curve holds. We measured one encoder build; libjpeg-turbo's trellis quantisation differs slightly from other implementations. The images contain little saturated colour, which flatters 4:2:0 in the subsampling table. And PSNR and SSIM are proxies: they cannot see the specific artefacts — banding in a sky, mosquito noise around a face — that people actually complain about, which is why the recommendations above sit below the settings where the metrics stop improving.
Resize, compress and convert images in your browser
Everything happens on your device — no upload, no account.
Sources
- JPEG (ITU-T T.81) specification overview — https://www.w3.org/Graphics/JPEG/itu-t81.pdf
- libjpeg-turbo documentation — https://libjpeg-turbo.org/Documentation/Documentation
- Pillow JPEG save options (quality, subsampling, optimize) — https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#jpeg
- SSIM index, original paper (Wang et al.) — https://ece.uwaterloo.ca/~z70wang/publications/ssim.pdf