Guide · Tradeoffs

Lossless, lossy,
and the honest middle

One guarantees exact pixels forever. The other throws detail away and hopes you cannot see it. Almost every argument about image compression is really an argument about which promise you need.

Exact output · Discarded detail · Near-lossless
0 bytes lost, lossless50–85% typical lossy saving1 irreversible step
Definitions

Two different promises

The distinction is not "good" versus "bad" quality. It is whether the decoder can reproduce the original bytes exactly.

LosslessLossy
Decoder outputBit-identical to inputAn approximation
Typical saving10–40% on photos, 60–80% on graphics50–85% on photos
Quality dialNone — there is nothing to tuneQuality or quantisation level
ReversibleYes, foreverNo — discarded detail is gone
Good forMasters, UI, text, transparencyDelivery copies, photographs

Both are legitimate. The mistake is expecting lossy output to behave like a master file.

Lossless

What exact output buys you

Lossless is not about visible quality — it is about being able to re-run a pipeline without accumulating damage.

  • Repeatable. Decode, edit, re-encode, again — no generation loss.
  • Auditable. Hashes match the original, so archival copies stay verifiable.
  • Alpha intact. Transparency survives exactly, including soft edges.
  • Sharp edges stay sharp. Text and UI never ring or bleed.

The cost is real

A lossless photograph is usually two to four times the size of a good lossy copy at the same visual quality. Lossless earns its cost on masters, screenshots, icons and anything that will be edited again — not on a thumbnail destined for a web page.

04_Hegasy_Hand.png 721 KB → 189 KB−73.8%

That PNG saving is still lossless: deflate and filtering remove redundancy without touching a pixel.

Lossy

What lossy takes, and where it shows

Lossy compression is not random damage. It removes specific things, in a specific order, and the order is what makes it predictable.

Explainer

Spend the bits the eye will not miss

Encoders discard two kinds of data. First, colour resolution: chroma is subsampled, because human vision resolves brightness far more precisely than hue. Second, high-frequency detail: fine texture and sharp edges are stored coarsely, because the eye's sensitivity to them falls off quickly.

Those decisions are why the artefacts appear where they do. Subsampling damages saturated colour and thin coloured type. High-frequency truncation damages text, line art and hard edges. Smooth gradients suffer from quantisation rather than either — which is why a sky can band long before a face looks soft.

Why a second pass makes it worse

Re-encoding a lossy file asks the encoder to compress an image that already contains quantisation noise. That noise is exactly the high-frequency detail the next pass is designed to drop, so the encoder spends bits on it or throws it away — either way, the result is worse than encoding once from the original. Compress once, and keep the master.

The full ordering of stages is on how image compression works.

The middle

What 'perceptually lossless' is allowed to mean

It means "we removed detail and you cannot see it at normal viewing size". That is a claim about perception, testing conditions and output size — not a guarantee.

Quality 85 on a photograph is usually indistinguishable at 100% on a good display. The same file inspected at 300% will show ringing. Both statements are true; only one is relevant to shipping.

Treat near-lossless as a starting range, not a certificate. If the image is a master, or will be re-edited, or is going to print at large size, use lossless and accept the bytes. For delivery, the near-lossless workflow is the right default.

Decision

Choose per content, not per preference

Four rules cover almost every real folder. The format pages cover the exceptions.

Master files → lossless. Keep the original; do not re-encode a master lossily and call it the original.
Photographs for delivery → lossy. JPEG at 80–85, or WebP when decode support allows.
Screenshots, UI, logos with text → lossless. Lossy codecs ring around glyph edges; the saving is not worth the mess.
Anything with alpha on the web → WebP or AVIF. Both keep the alpha channel; JPEG cannot.

The measured versions of these tradeoffs are on the benchmarks page.

FAQ

Lossy vs lossless — FAQ

Is WebP lossless or lossy?

Both. WebP contains a lossy codec (VP8) and a separate lossless codec (VP8L); the encoder chooses based on your settings. A WebP file does not announce which one produced it.

Does saving as PNG guarantee no quality loss?

Yes for the file itself — PNG stores pixels exactly, so re-saving never degrades them. But converting a JPEG to PNG preserves the damage the JPEG already did; it just stops adding more.

Is AVIF lossy?

AVIF supports both, though in practice it is almost always used lossy. Its lossless mode is rarely competitive with PNG or lossless WebP.

Can I tell whether a file is lossy from its metadata?

Usually from the format, not from a flag. JPEG and WebP are ambiguous by design; PNG and TIFF are lossless by definition.

How much can lossless actually save?

On photographs, 10–40% from better entropy coding. On flat graphics, 60–80% — PNGs of UI are notoriously wasteful.

What quality is "visually lossless"?

There is no standard number. On photographs, quality 85 is a common working definition at 100% view. Treat it as a heuristic and verify on your own images.

Lossless · Lossy · Near-lossless

Compress with the tradeoff you actually chose

Lossless for PNG and WebP, quality control for JPEG and AVIF — per folder, in one pass.

Download for Windows
Windows 10/11 · Offline · Free