Fundamentals · 5 min read

Lossy vs Lossless Compression, Explained Simply

Two ways to make a file smaller: reorganise the data with zero loss (lossless), or throw away detail you can't see (lossy). Knowing which is happening — and when — is the key to small files that still look great.

Key takeaways
  • Lossless = every pixel preserved, modest savings (PNG).
  • Lossy = discards imperceptible detail, huge savings (JPEG, WebP, AVIF).
  • Use lossless for logos/screenshots/masters; lossy for photos you’ll view.
  • Artifacts come from pushing quality too low or re-compressing repeatedly.
Compress images free →

Every compression method falls into one of two camps. Understanding the difference takes two minutes and makes every other decision about images — format, quality, workflow — obvious.

Lossless: smaller, but nothing lost

Lossless compression finds patterns and redundancy in the data and stores them more efficiently, so that decompressing reproduces the exact original — every pixel identical. Think of it like folding a shirt: it takes less space in the drawer but unfolds to precisely the same shirt.

The trade-off is that there is a limit to how much you can save without discarding anything. For photographs — millions of subtly different pixels — that limit is reached quickly, so lossless files stay large. PNG is the classic lossless format; WebP and AVIF also have lossless modes.

Lossy: throw away what you can't see

Lossy compression is cleverer and more aggressive. It exploits the fact that human vision is much more sensitive to some things (brightness, edges) than others (subtle colour shifts, very fine texture). It permanently discards the detail you're least likely to notice and keeps the rest — more like vacuum-packing the shirt: far smaller, and you'd never notice the difference wearing it.

Because it can drop data, lossy achieves savings lossless can't dream of — often 80–95% on a photo. The amount discarded is set by the quality value, which is the single dial you actually control. How to set it well is covered in compress without losing quality.

Which to use, at a glance

Use lossless for…Use lossy for…
Logos, icons, line artPhotographs of any kind
Screenshots with textHero and banner images
Images you'll keep editingThumbnails and previews
Master / archive copiesAnything shipped to the web or email

The one rule that prevents most problems

Never re-compress an already-compressed lossy file. Each lossy save throws away a little more detail, and it compounds — the digital equivalent of photocopying a photocopy. Symptoms are blocky squares, halos around edges, and banding in smooth skies (all called “artifacts”). Always keep an original master and compress from it, not from a previous export.

Where formats fit

JPEG is lossy-only. PNG is lossless-only. WebP and AVIF do both, which is a big reason they've become the modern default — one format covers a photo and a logo. If you're choosing, see JPEG vs PNG vs WebP vs AVIF, then run the result through the compressor to see the byte counts side by side.

Frequently asked questions

What is the difference between lossy and lossless compression? +

Lossless compression makes a file smaller while keeping every pixel exactly the same — decompressing gives back a perfect copy. Lossy compression permanently discards some detail (ideally detail you can’t see) to make files much smaller. PNG is lossless; JPEG is lossy; WebP and AVIF can do both.

Is lossy compression bad? +

No — used sensibly it is how nearly every photo on the internet is stored. At a good quality level the discarded detail is invisible while the file is a fraction of the size. It only becomes “bad” when pushed too far (low quality) or applied repeatedly to the same file.

When should I use lossless compression? +

When every pixel matters: logos and line art, screenshots with text, images you will edit further, medical or scientific imagery, and master/archive copies. For ordinary photos meant to be viewed, lossy at quality ~80 is the better trade.

What are compression artifacts? +

Visible flaws introduced by pushing lossy compression too hard — blocky squares, halos around edges (“ringing”), and banding in smooth gradients like skies. They are avoided by keeping quality reasonable and by not re-compressing an already-compressed image.

Try it on your own images

Batch-compress unlimited photos in your browser — pick a use-case preset, or fine-tune quality. Free, no account.

Open the compressor →