Compress

Compress JPGCompress PNGCompress WebPCompress AVIFCompress to 100 KBCompress to 200 KBCompress to 500 KB

Convert

Convert to JPGConvert to PNGConvert to WebPConvert to AVIFWebP to JPGPNG to JPGJPG to PNGWebP to PNG

Image tools

Crop ImageResize ImageImage to PDFImage to Base64

More tools

AI Prompt GeneratorColor PickerTime Zone ConverterQR Code GeneratorWord CounterPassword Generator
Image Compression

Lossy vs Lossless Image Compression: What’s the Difference and When to Use Each

Both shrink files, but only one gives your pixels back exactly. Understanding the difference helps you pick the right method for every image.

The core difference

Lossless methods are like packing a suitcase more cleverly: everything comes out exactly as it went in. Lossy methods leave some things behind. The ones left behind are chosen because people are unlikely to miss them, such as very fine colour variations or high-frequency texture. Once discarded, they cannot be recovered from the compressed file.

AspectLosslessLossy
Pixels after decodingIdentical to the originalApproximation of the original
Typical formatsPNG, lossless WebP, lossless AVIF, TIFFJPEG, lossy WebP, lossy AVIF
File size for photosLargeMuch smaller
Repeated savingSafeAdds artefacts each time
Best forLogos, screenshots, line art, mastersPhotographs for web, email and print previews

How lossless compression works

Lossless encoders look for redundancy. In PNG, each row is first filtered so that neighbouring pixels become similar numbers, then DEFLATE packs repeating patterns. Flat areas of colour compress extremely well, which is why a screenshot or logo is small as PNG but a noisy photograph is not. Lossless WebP uses more advanced prediction and colour transforms, and Google reports its files are about 26% smaller than PNG.

How lossy compression works

JPEG and similar codecs convert image blocks into frequency components, then quantise them, meaning they round the less visible components more coarsely. The quality setting controls how coarse that rounding is. Many lossy codecs also store colour at lower resolution than brightness, because human vision is more sensitive to brightness. The result is a file that can be a fraction of the lossless size while looking similar at normal viewing size.

Newer codecs such as WebP and AVIF use predictive techniques borrowed from video coding and typically reach a given visual quality at a smaller size than JPEG.

Generation loss: why you should not re-save lossy files

Each time you open and save a JPEG, it is decoded and quantised again, and the rounding errors accumulate. After many cycles you see blocky edges, smeared detail and colour shifts. The fix is simple: keep an original (or a lossless master) and always export copies from it. Converting a JPEG to PNG does not restore detail. It only stops further loss.

Which one should you use?

  • Photographs for the web or email: lossy, at a quality you checked by eye, typically 75–85. See the JPG compressor and the WebP converter.
  • Logos, screenshots, diagrams, text: lossless. The PNG compressor keeps pixels intact when an image has 256 colours or fewer, and offers an optional colour-reduction mode when a smaller file matters more.
  • Editing masters and archives: lossless (or the camera's original file), then export lossy copies.
  • Needs transparency: PNG or WebP.

“Visually lossless” and metrics

A lossy file can be visually indistinguishable from the original at normal size. Researchers use metrics such as SSIM (structural similarity) to compare images, and Google used SSIM to compare WebP and JPEG in its published study. Metrics are helpful but not perfect, so your eyes on the actual image still decide.

Practical tips

  • Check results at 100% zoom, not shrunk to fit.
  • Look at faces, skies, gradients and text edges first.
  • Resize before compressing. See the compression workflow.
  • Do not convert lossy to lossless expecting a quality boost.

Try it now: Compress JPG

Free, private and runs in your browser. Nothing is uploaded.

Open Compress JPG

Frequently asked questions

The PNG format itself is lossless, but a tool can make the image smaller by reducing it to fewer colours before saving, which is a lossy step. Check whether your compressor does this.
No. It is what makes web photos practical. The key is choosing a moderate setting and not re-compressing repeatedly.
No. The discarded information is gone, so a compressed copy cannot return to the original.
Lossless is exact by definition. A high-quality lossy file can look the same to the eye while being far smaller.

Sources and further reading

External links open the original source. We cite primary or official documentation for factual claims and re-check them when we update an article. See our editorial policy.

Keep reading