The short answer
The quality number tells the encoder how much detail it may discard. A higher number keeps more detail and makes a larger file; a lower number discards more and makes a smaller one. It is a position on the encoder's own scale, not a percentage of the original, so the same number means different things in different formats and programs.
What the number controls
A lossy encoder splits the picture into broad shapes and fine detail, then rounds the fine detail off to save space. The quality number sets how coarse the rounding is. Near the top of the scale almost nothing is rounded. Near the bottom, whole areas are reduced to rough blocks.
Two things follow that can surprise people. An ordinary JPG saved at 100 is still not an exact copy, because some rounding remains. And the relationship is not even: the top of the scale tends to add a lot of file size for improvements that are hard to see, while the bottom tends to save little extra space for damage that is easy to see.
Why a number does not carry over
Each encoder defines its own scale. The same number typed into two different programs can give files of different sizes that look different. Between formats the numbers are not comparable either. On this site, Balanced uses 76 for JPG, 76 for WebP and 55 for AVIF, each on its own encoder's scale.
So a number quoted in an article or a forum post is only a hint. What counts is the result on your picture in the tool you are using.
What a setting that is too low looks like
- Square blocks in areas that should be smooth, such as sky or a plain wall.
- A faint halo or speckle around lettering and other hard edges.
- Fine texture, such as hair, grass or fabric, turning flat and smeared.
- Smooth colour changes breaking into visible steps.
Choosing a number
- Open the Compress JPG tool and add a picture that is typical of the ones you need to shrink.
- Look at the Balanced result first. For JPG that is quality 76.
- Choose Custom. The slider runs from 10 to 100.
- Move it down in steps, checking each result with the Compare slider at the size the picture will really be viewed.
- Stop at the last setting where you were still content, and use that for similar pictures.
The picture matters as much as the number
At one fixed quality, a busy picture full of detail makes a larger file than a plain one, because there is more to describe. A setting that suits portraits may be too low for a page of small text. Choose by the kind of picture, and look again when the kind changes.
When a number is the wrong control
If what you have is a limit in KB, guessing at quality numbers is slow. Choose Target size, type the limit, and the tool searches the quality settings for the best result at or under it. If the lowest sensible quality is still too big, it reduces the pixel dimensions and says so in the result. For PNG the quality number has no effect, because PNG discards nothing.