Open Tools LibraryOpen Tools Library
Images & PhotosImageCompressionHow-to6 min read·July 31, 2026

Lossy vs. Lossless Compression: What Actually Happens When You Shrink an Image

Not all compression is the same trade-off. Here's the real difference between lossy and lossless — and how to pick the right one instead of dragging a slider until it looks fine.

Open Tools Library

Open Tools Library Team

Published July 31, 2026

Key takeaways

  • Lossy compression permanently discards image data; lossless only removes redundancy, so nothing is lost.
  • JPEG is lossy by design and PNG is lossless by design — the format itself decides the trade-off, not a setting.
  • WEBP is unusual: it supports both a lossy and a lossless mode within the same format.
  • Photos compress well as lossy; flat-color graphics like screenshots and logos degrade badly and belong in a lossless format.
  • Resizing pixel dimensions cuts an oversized photo's file size far more than compression quality alone.

Two different promises, not two settings on the same slider

"Compress this image" gets treated as a single operation with a quality dial, but lossy and lossless compression are really two different promises about what happens to your data. One promises a smaller file and accepts that some detail is gone for good. The other promises the exact original pixels back, every time, and settles for a more modest size reduction in exchange.

Knowing which promise you're making — usually decided by the file format you save into, not a checkbox — is the difference between a compressed photo that looks fine and a compressed screenshot that looks noticeably worse than the original.

What lossy compression actually throws away

JPEG-style lossy compression works by identifying detail human vision is comparatively bad at noticing — subtle color shifts, high-frequency texture — and discarding it, permanently. That data doesn't exist anymore once the file is saved; there's no setting that brings it back on a later re-save.

At moderate compression this is genuinely invisible. Push it too far, though, and the discarding becomes visible as its own kind of artifact: blocky squares around sharp edges, and banding where a smooth gradient — a sunset sky, a shadow — should be continuous but instead steps between visible bands of color.

Lossy compression doesn't make the file smaller by being clever — it makes it smaller by leaving detail behind.

What lossless compression does instead

Lossless compression, the kind PNG uses, never discards a single pixel value. It finds smarter, more efficient ways to encode the exact same data — exploiting repetition and patterns the same way a zip file shrinks a text document without changing a single letter inside it. Decompress it and you get back pixel-for-pixel the same image you started with.

This is why PNG is the standard choice for screenshots, logos, and diagrams: large flat-color regions and sharp text edges compress extremely efficiently even losslessly, and there's zero risk of the blocky artifacting a photo-oriented lossy format would introduce around crisp text.

Why the same button gives wildly different results

Run a photo and a screenshot through the same lossy compressor and the outcomes diverge sharply, for a structural reason, not a bug.

  • A photo has enormous amounts of subtle, redundant micro-detail across its whole surface — exactly the kind of detail lossy compression is designed to discard first, with minimal visible cost.
  • A screenshot or logo has few distinct colors and sharp, high-contrast edges (text, UI lines) — exactly where lossy artifacting is most visible, because there's no busy detail to hide it in.

The lever most people skip: pixel dimensions

A 4000×3000 photo destined for an 800px-wide blog embed benefits more from being resized down first than from cranking the compression quality down. Compression re-encodes the pixels you already have; resizing reduces how many pixels there are to store in the first place — a lever compression alone can't pull.

Try both, side by side

Open Tools Library's Image Compressor shows a live before/after size comparison so the trade-off is visible before you commit, the Image Format Converter switches cleanly between JPG, PNG, and WEBP, and the Image Resizer handles the pixel-dimension lever separately. All three run entirely in your browser — nothing you upload leaves the tab.

FAQ

Frequently asked questions

Which format should I use for a photo I'm putting on a website?

JPEG or WEBP in lossy mode — photos have the kind of redundant detail lossy compression discards efficiently with minimal visible cost, and the size savings over PNG are usually substantial.

Does converting a JPEG to PNG make it lossless retroactively?

No. Once JPEG has discarded detail, converting the result to PNG just losslessly compresses the already-degraded image — it can't recover data that's already gone.

What is WEBP and is it actually better?

WEBP is a newer format that supports both a lossy and a lossless mode in one file type, generally producing smaller files than JPEG or PNG at equivalent quality — its main limitation is compatibility with older software, which has become rare.

Why does my compressed screenshot look blurry around text?

It was likely saved with lossy compression, which introduces artifacting around sharp edges like text. Screenshots and other flat-color graphics should be saved as PNG (lossless) instead.