Technology · 8 min read · Updated 13 August 2026
What compression actually throws away
Every quality slider is deciding what you will not miss. Knowing what it discards first is how you tell a safe setting from a ruinous one.
Every compression tool gives you a slider and no explanation of what it does. Quality 80 sounds safer than quality 40. But safer in what way, and what has actually left the file?
The answer is more interesting than “some detail”. Once you know it, you can choose a setting instead of guessing at one.
Two very different mechanisms
Compression comes in two kinds, and they have almost nothing in common beyond the name.
Lossless: finding what repeats
Lossless compression writes the same information more efficiently. If a file contains the same sequence a thousand times, store it once with a note saying “repeat this”. Nothing is lost. Decompress and you get back every original byte.
This is what ZIP and PNG do. Both are built on the DEFLATE method (RFC 1951). It is also what makes text compress so well, because language repeats itself a lot. It is also why a file already compressed barely shrinks again. Zip a ZIP and you gain almost nothing, because the repetition has already been removed.
Lossy: deciding what you will not miss
Lossy compression works quite differently. It permanently discards information, chosen so that the loss is hard to notice. JPEG, MP3 and most video work this way.
The interesting part is how it decides. These formats are built on measurements of human perception, meaning what the eye and ear really notice. They throw away the parts we are known to be bad at seeing or hearing.
What JPEG discards, in order
JPEG makes three moves, roughly in this sequence.
First, colour resolution. Human eyes have far more receptors for brightness than for colour. So JPEG keeps brightness at full resolution and stores colour at half, often a quarter. Three quarters of the colour information is gone before any quality setting is used, and almost nobody can see it.
Second, fine detail in busy areas. The image is cut into 8×8 blocks, as set out in the JPEG standard (ITU-T T.81), and each block is described as a combination of patterns, from flat to very fine. The finest patterns are stored least precisely, because in a detailed area the eye cannot follow them anyway. This is the part the quality slider controls.
Third, at low settings, everything else. Push far enough and whole blocks become a single flat colour. That is the blockiness you see in a heavily compressed image. You are looking at the 8×8 grid itself.
Why the same setting ruins one image and not another
This explains the thing that puzzles people most. Quality 60 on a photograph of a landscape is invisible. Quality 60 on a screenshot of text is a disaster.
JPEG discards fine detail first, and it assumes fine detail sits inside busy natural areas where it will not be missed. Text breaks that assumption: a letter is nothing but a hard edge between black and white. Discarding the fine detail around it produces the faint grey halos called ringing, and the text looks smeared.
So the rule has nothing to do with a number. Here it is: lossy formats suit photographs and ruin anything with sharp edges. Screenshots, logos, diagrams and line art belong in PNG, where nothing is discarded at all.
What happens inside a PDF
Compressing a PDF can mean several different operations, and this is why results vary so much.
A PDF made from a Word document is mostly text, stored as characters plus font references and already compressed losslessly. There is almost nothing to remove. People try to compress these, see a two per cent saving, and decide the tool is broken. The tool is fine. The file was already efficient.
A scanned PDF is a different case. Every page is a photograph, and that is why the file is so large. Here compression has real work to do, and a 40MB scan dropping to 2MB is routine.
This is why our compressor asks what you want and then tells you plainly when it cannot get there. If a PDF is already text, it will say so rather than re-encoding the pages into something larger and calling it a success.
The one thing that does permanent damage
Lossy compression costs you something every time. Each save discards more, and the losses add up.
Open a JPEG, crop it, save. Open again, adjust the brightness, save again. Ten rounds later the damage is plain to see, and no setting recovers it. Each save worked from the already-damaged version, and never from the original.
The habit that avoids this: keep a lossless original, and export a compressed copy once, at the end. Edit the original every time. Never edit the export.
It is also why converting a JPEG to PNG does not improve anything. What JPEG discarded is gone. PNG will store the damaged version perfectly, in a much larger file.
Choosing a setting, practically
- Photographs for the web: quality 75–85. Below 70, artefacts start showing in skies and skin; above 90 the file grows fast for a difference nobody can see.
- Anything with text or hard edges: do not use a lossy format. PNG.
- Hitting a required file size: reduce the dimensions first, then compress. Fewer pixels means each remaining one keeps more detail, because the same budget is spread over a smaller area.
- Archiving: keep the original. Storage is cheap, and the detail you discard today cannot be recovered when you need it in five years.
Seeing it for yourself
Our sample PNG is made for this. It puts a smooth gradient behind a hard-edged grid, because the two fail differently: lossy compression shows as banding across the gradient, and poor resizing shows as blurred or uneven grid lines. A flat test image would hide both.
Run it through the image compressor at several settings and compare. Five minutes doing that will teach you more about your own tolerance than any recommended number, including the ones above.
Tools mentioned in this article
- Compress Image Make images smaller with a quality slider you control.
- Compress PDF Shrink a PDF to the size a portal or inbox accepts. Pick a target size or a quality.
- Compress PDF to 100 KB Shrink a PDF to under 100 KB, or find out the smallest it can honestly go.
- PNG to JPG Convert to JPG with a background colour and quality slider.