FilesProcess

Lossy, lossless, and what “quality 80” actually throws away

FilesProcess9 min read

We build browser-based file tools and test every one of them against the forms and specs people actually have to satisfy.


Every compression tool gives you a slider from 0 to 100 and no explanation of what the number means. It is not a percentage of anything. It does not mean “80% as good”. It is a dial on how aggressively the encoder is allowed to discard information you probably will not miss.

The two kinds of smaller

Lossless compression finds a more efficient way to write exactly the same picture. Decompress it and you get back every original pixel value, bit for bit. PNG works this way, as do ZIP and FLAC. The saving comes from patterns — a thousand identical white pixels can be described far more briefly than listed.

Lossy compression throws information away and keeps what your eye is least likely to notice missing. JPEG works this way, as do MP3 and AAC. The original is gone; what you get back is a convincing approximation.

Neither is better. They answer different questions. Lossless asks “how small can this be while staying identical?”; lossy asks “how small can this be while still looking right?”. For photographs the second question has a far better answer — often ten times better.

What JPEG actually discards

JPEG exploits two facts about human vision, and knowing them explains every artefact you have ever seen.

First: we see brightness in far more detail than colour. JPEG stores the brightness channel at full resolution and often halves the colour resolution. You rarely notice, because your eyes work the same way — until you have small red text on a blue background, where the colour edge is the detail, and it smears.

Second: we notice broad shapes more than fine texture. The image is cut into 8 × 8 blocks and each is described as a stack of patterns from coarse to fine. The quality setting decides how roughly the fine ones are recorded. At high quality they are kept nearly intact; at low quality most are rounded to zero and vanish.

That is why over-compressed JPEGs look the way they do: blocking where the 8 × 8 grid becomes visible, and ringing — faint halos along hard edges, worst around text and anything drawn rather than photographed.

Where the cliff is

Quality behaves non-linearly, which is the practical thing to know. Dropping from 100 to 90 saves an enormous amount and costs almost nothing visible. Dropping from 50 to 40 saves little and costs a lot.

Rough behaviour of JPEG quality settings on a typical photograph.
QualityWhat happensUse it for
100Huge files, no visible gain over 95Almost nothing
90–95Visually indistinguishable from the originalArchiving, print, further editing
75–85The sweet spot; artefacts only on close inspectionWeb images, uploads, most things
60–75Visible on flat colour and edges, fine for photosTight size limits
Below 50Blocking and ringing become obviousOnly when a hard KB limit forces it

If you are trying to hit a specific file size rather than a quality level, do not guess at the slider — the compressor searches for the highest quality that fits your target, which is the same job done from the other end.

Generation loss: the mistake that actually ruins photos

A single lossy compression at a sensible quality is fine. The damage comes from doing it repeatedly.

Every time you open a JPEG, change something and save it again, the encoder re-analyses an image that is already missing information and discards more. Four or five rounds of crop-save-crop-save and the softness is unmistakable. This is why a photo that has been forwarded through several chat apps looks the way it does: each hop re-encoded it.

The habit that avoids it: keep the original, do all your edits in one pass, export once. If you must work in stages, work in PNG and convert to JPEG at the end.

Why PNG behaves completely differently

PNG is lossless, so there is no quality slider — a PNG is always exact. Its size depends on how compressible the content is, which produces results that surprise people:

  • Screenshots, logos, diagrams, flat colour compress superbly. Often smaller than a JPEG and perfectly sharp.
  • Photographs compress badly. A PNG photo is routinely five to ten times the size of a JPEG that looks the same.

So the format choice is really a content choice: photograph means JPEG, graphic means PNG. Saving a screenshot of text as a JPEG gives you ringing around every letter for no size benefit — the single most common wrong choice.

PNG can still be made smaller two ways. Lossless optimisation re-packs the data and finds better filters, typically saving 10–30% with the pixels untouched. Colour reduction cuts the palette to 256 colours or fewer, which is technically lossy but often invisible on graphics — and dramatic on size. Compress PNG does both and keeps transparency.

WebP and AVIF, briefly

Both are newer and genuinely better at the same job — meaningfully smaller than JPEG at matching quality, and both can do lossless and transparency, which JPEG cannot. AVIF is the smaller of the two and the slower to encode.

The catch is the familiar one: support. Browsers handle both well now; the assorted software, upload forms and printers of the world are a decade behind. Use them for your own website, keep JPEG for anything you are handing to someone else. The converter moves between all of them.

The short version

  • Lossless keeps every pixel; lossy keeps the appearance. Photographs want lossy.
  • Quality 75–85 is right for almost everything. Above 95 is waste, below 50 is visible.
  • Repeated saving is what actually destroys images. Edit once, export once, keep the original.
  • Photograph → JPEG. Screenshot, logo or diagram → PNG. Getting this backwards costs you both size and quality.

All of these run in your browser — JPEG, PNG or any format — using the same encoders desktop software uses, compiled to WebAssembly. Nothing is uploaded.

Tools used in this guide

Everything here runs in your browser. Your documents are never uploaded.

How that works