What the quality number actually selects
The encoder splits the picture into blocks of eight pixels by eight and turns each one into sixty-four frequency coefficients: one for the block's average brightness, the rest for progressively finer variation across it. Each coefficient is divided by an entry in a quantisation table and rounded to a whole number. Coefficients that round to zero cost almost nothing to store, which is the entire trick.
Quality picks the table. A high number means small divisors and few zeros; a low number means large divisors, many zeros and a short file. Nothing about that scale is linear and nothing about it is a percentage — quality 50 is not half of anything, and the same 50 in a different encoder means a different table again.
Where the floor is
Every JPEG already carries the quantisation of the pass that made it. Re-encoding at a quality above that pass adds bytes without adding detail; re-encoding at a quality below it removes more detail and finds progressively less to remove. Somewhere around the setting the file was originally written at, the curve flattens, and further reduction buys blocking rather than bytes.
When a run lands within three percent of where it started, this page says so in plain terms and suggests keeping the original, because a three percent saving is not worth a generation of loss.
What a second pass costs
- The blocks are re-quantised on a grid that no longer matches the detail in the picture, so ringing around hard edges compounds rather than repeating.
- Flat areas that were already slightly banded band further, and the banding is the part people notice on skies and skin.
- Nothing about the file records that it has been through two passes, so the only way to judge the damage is to look at it — which is what the 400 percent comparison is for.
No trellis quantisation, no scan control, no subsampling choice.
This page drives the browser's own JPEG writer. A MozJPEG-class encoder would typically reach the same visual quality in ten to twenty percent fewer bytes, and would let you choose 4:4:4 for red text or a progressive scan script for a slow connection. None of that is available here, and no setting on this page is standing in for it.
Questions people arrive with
- What does quality 80 mean?
- It selects a quantisation table, not a percentage of anything. At 80 the coefficients that carry fine detail are divided by larger numbers before rounding than they are at 95, so more of them round to zero and the file gets shorter. The same number in WebP or AVIF selects something different again, which is why this page does not pretend the scales are interchangeable.
- What is the lowest quality worth using?
- For a photograph destined for a screen, somewhere between 70 and 85 is usually where the loss stops being visible at 100 percent and the file is already a fraction of the original. Below about 50 the eight-by-eight block structure starts showing on flat areas such as skies and skin. The slider here goes down to 5 because a byte cap sometimes demands it, not because 5 is a setting anyone should choose on purpose.
- Does re-saving a JPEG at quality 100 keep it lossless?
- No. Quality 100 still quantises and still resamples nothing that was already lost, and the pixels have already been through one lossy pass. A JPEG re-saved at 100 is usually larger than the original and slightly worse. If a file must not lose anything further, do not put it through a JPEG encoder again.
- Why did quality 90 make my file bigger?
- Because the file you opened was saved at a lower quality than 90. Asking for a higher quality than the picture actually contains spends bytes describing detail that is no longer there. The ledger marks that row as no gain and tells you to keep your original.
- Can I control chroma subsampling here?
- Not in this build. The browser's JPEG writer chooses the subsampling itself, usually 4:2:0, and does not expose the choice. That matters most for red text on a plain background, where 4:2:0 visibly softens the letters. If your picture is text-heavy, PNG is the better container for it.
Elsewhere on this site
- Compress to a size in KBWhen the requirement is a number from an upload form rather than a quality you choose.
- Why this JPEG will not get smallerThe quantisation floor in more detail, and how to tell a stubborn file from a badly set one.
- Compress a PNGFor screenshots, diagrams and anything with text or flat colour, where JPEG is the wrong container.