Home · Blog · Lossy vs lossless
Lossy vs lossless compression: what you're actually trading
13 Oct 2026 · Images · 7 min read
Every image file on your computer is the result of a negotiation. On one side sits quality: every pixel exactly as captured. On the other sits size: a file small enough to send, store and load quickly. Compression is the negotiation itself, and it comes in two fundamentally different styles — one that keeps every pixel, and one that quietly throws some of them away.
The words for those styles are lossless and lossy, and you've already met both. The PNG screenshot on your desktop is lossless. The JPEG photo from your phone is lossy. Most people pick between them by habit — JPEG for photos, PNG for everything else — without knowing what the choice actually costs. This article is the full story of that trade, with real numbers, so you can stop guessing.
The short version, for the impatient: lossless compression is like folding a map — unfold it and nothing is missing. Lossy compression is like summarising a novel — shorter, perfectly readable, but the original sentences are gone for good.
Lossless: every pixel survives
A lossless compressor looks at your image and finds smarter ways to describe it, without changing a single pixel value. Large areas of flat colour get described once instead of pixel by pixel. Repeating patterns get shorthand. It is the same family of trick as a ZIP file, and like a ZIP file, it is fully reversible: decompress the file and you get back the exact original, bit for bit.
PNG is the best-known lossless image format, and WebP has a lossless mode too. How much they shrink a file depends entirely on the image. A screenshot of a mostly-white document at 1920×1080 might be 6 MB as raw pixels and squeeze down to 300–500 KB as a PNG — a twenty-fold saving, because flat white compresses beautifully. A detailed photograph of a forest, on the other hand, might only shrink from 36 MB raw to 20 MB as PNG, because there is genuine unpredictable detail in nearly every pixel and no shorthand can capture it.
That content-dependence is the key thing to understand about lossless compression. It never damages the image, but it also never promises a particular file size. Simple graphics with flat colours and sharp edges — logos, diagrams, screenshots, text — compress dramatically. Busy photographs barely compress at all. The format is honest, but it is not always helpful.
Lossy: throwing away what you won't miss
Lossy compression starts from a different observation: human vision is not a pixel-measuring instrument. We are far more sensitive to brightness changes than to colour changes, and far more sensitive to broad shapes than to fine high-frequency detail. A lossy encoder exploits those blind spots deliberately, discarding information your eyes were unlikely to notice.
JPEG, the classic lossy format, works roughly like this. It converts the image into a colour space that separates brightness from colour, then throws away half or more of the colour resolution — a step called chroma subsampling — because your eyes barely register it. Then it breaks the image into 8×8 blocks, converts each block into frequencies, and rounds off the high frequencies aggressively. The "quality" slider you see in every image tool controls how aggressive that rounding is: at quality 95 the rounding is gentle, at quality 60 it is brutal.
WebP's lossy mode uses a more modern descendant of the same ideas, borrowed from video compression, which is why it typically produces smaller files than JPEG at the same visual quality. But the principle is identical: the encoder makes thousands of tiny irreversible decisions about what you won't miss, and the file gets dramatically smaller as a result.
The irreversibility is the whole point and the whole price. Open a JPEG, save it again at lower quality, and the second save discards detail from an image that already had detail discarded. There is no "original" hiding inside the file waiting to be recovered. This is why every guide — including this one — tells you to keep an untouched original of anything irreplaceable.
The same photo, four ways
To make the trade concrete, here is what happens to a typical 12-megapixel phone photo (4000×3000 pixels, a daylight landscape) saved four different ways. Your exact numbers will vary with the scene, but the proportions are representative:
| Format and setting | File size | What you see |
|---|---|---|
| PNG (lossless) | ~11 MB | Perfect. Every pixel identical to the original. |
| JPEG, quality 95 | ~3.8 MB | Perfect for all practical purposes. You would need to zoom to 200% and hunt to find any difference. |
| JPEG, quality 80 | ~1.6 MB | Excellent. Clean at normal viewing sizes; very slight softness in fine textures if you look for it. |
| WebP, quality 80 | ~1.1 MB | Excellent, and about a third smaller than the equivalent JPEG. |
| JPEG, quality 60 | ~850 KB | Noticeable. Blocky artefacts in smooth skies, smudged fine detail. Fine for a small thumbnail, not for anything larger. |
Notice the shape of the trade. Going from PNG to JPEG at quality 95 cuts the file to a third with no visible cost — that is the free lunch of lossy compression, and it is enormous. Going from quality 95 to 80 halves the file again for a barely perceptible cost. But below about 70, each further saving starts visibly damaging the image. The quality slider is not linear: the top of the range is nearly free, and the bottom is expensive.
When the trade actually matters
Not every image deserves the same decision. Here is how to think about it by use case:
- Archival masters and anything you will edit later: lossless, always. Every edit-and-resave cycle on a lossy file compounds the damage, so your "negative" should be the best quality you have — the camera original, a PNG, or a lossless WebP.
- Photos for the web: lossy, at quality 75–85. This is the sweet spot where files are small and nobody can tell. This single decision is responsible for most of the bandwidth savings on the modern web.
- Logos, icons, diagrams, screenshots with text: lossless (PNG or WebP lossless). Lossy compression is at its worst on sharp edges and flat colours — exactly what graphics are made of — producing fuzzy halos around text that everyone notices.
- Print: lossless or maximum-quality lossy. Printers have far higher resolution than screens, and artefacts invisible on a phone become visible on paper.
- Thumbnails and previews: aggressive lossy is fine. At 200 pixels wide, there is not enough detail left to damage.
The catch nobody warns you about: generation loss
Here is the honest caveat, and it is the most practically important paragraph in this article. Lossy damage accumulates across saves. A photo saved at quality 80, opened, and saved again at quality 80 is not the same as saving the original once at quality 80 — the second save discards detail from an already-damaged image, and the artefacts stack up. Do this three or four times and the result looks distinctly worse than a single save at the same setting.
This matters more than it used to, because images now routinely pass through multiple lossy stages without anyone noticing. You take a photo (lossy, in-camera JPEG), message it to a friend (the messaging app recompresses it), they post it to social media (recompressed again), and someone screenshots the post (recompressed a fourth time). Each step is defensible on its own; together they turn a crisp photo to mush. The defence is simple: always go back to the earliest, least-compressed version you have before doing anything that involves another save.
One more subtlety worth knowing: recompressing a JPEG at a higher quality setting than the original does not restore anything — it just spends extra bytes describing the artefacts the first compression left behind, and the file can come out larger than it went in. Quality only flows downhill.
The rule of thumb that survives all of this: keep one lossless original somewhere safe, and make every lossy copy from that original, once, at the end. Do that and the lossy-versus-lossless question stops being a gamble and becomes what it should be — a deliberate, informed choice per image.