Every compressed image file has taken one of two fundamentally different paths to get smaller: lossy or lossless. The distinction isn't just technical trivia — it determines whether the compressed file can ever be restored to pixel-perfect original quality, and it's the single most important concept for understanding why some image formats shrink so much more than others. Neither approach is inherently better; each is simply built for a different kind of job.
What lossless compression does
Lossless compression shrinks a file size by finding more efficient ways to store the exact same pixel data — identifying repeated patterns and encoding them more compactly — without discarding any actual image information. Decompressing a losslessly compressed file recreates the original pixel data exactly, bit for bit. PNG is the most common lossless image format, which is part of why PNG files tend to be considerably larger than an equivalent JPEG.
What lossy compression does
Lossy compression achieves much smaller file sizes by deliberately discarding some image information that's judged least noticeable to human perception — subtle color gradations, fine detail in areas with a lot of visual "noise" already, and so on. This data is genuinely gone after compression; there's no way to fully recover it, even by decompressing carefully. JPEG and most WebP compression are lossy, which is why they can achieve dramatically smaller file sizes than PNG for photographic content.
Which situations call for each
- Lossless suits screenshots, logos, illustrations with flat colors and sharp edges, and any image where every pixel needs to stay exactly accurate (like a diagram with fine text).
- Lossy suits photographs and other complex, high-detail images where a small, generally imperceptible loss in fine detail is an acceptable trade for a significantly smaller file, which matters a great deal for web performance.
A key practical consequence: generational loss
Because lossy compression permanently discards data, repeatedly opening, editing, and re-saving a lossy file (like a JPEG) compounds quality loss with each save — a phenomenon sometimes called generational loss. Every re-save applies fresh compression on top of an already-compressed, already-degraded image. This is exactly why it's best practice to keep an uncompressed or losslessly compressed master copy of an important image, and only export a lossy compressed version as the final output step, rather than repeatedly editing and re-saving the same lossy file.
A middle-ground option: 'near-lossless' settings
Some tools offer a "near-lossless" or very high-quality lossy setting (95% and above) as a middle ground — technically lossy, meaning some data is discarded, but at a level so minor that the visual difference from a true lossless file is effectively undetectable in normal viewing, while still providing some file-size reduction over a fully lossless save. This can be a reasonable compromise for images where a fully lossless PNG feels like overkill but any visible quality loss is still unacceptable.
Try the image tool yourself — free, instant, no upload to any server.
Open the toolFrequently asked questions
Can a lossy compressed image ever be restored to its original quality?
No. Once lossy compression discards image data, that specific information is permanently gone. Decompressing the file just reconstructs an approximation based on what data remains, not the original exactly.
Is PNG always lossless?
Standard PNG compression is always lossless, though some tools offer a separate "lossy PNG" mode that intentionally reduces the color palette to shrink file size further, at the cost of no longer being truly lossless.
Why do repeated saves of the same JPEG make it look worse over time?
Because JPEG compression is lossy, each time the file is opened, edited, and re-saved, another round of data gets discarded on top of what was already lost in previous saves, compounding quality loss with every cycle. A simple habit that avoids this problem entirely: treat any lossy file as a finished output rather than an editable working file, and always return to an original or a losslessly compressed master copy for further edits, instead of repeatedly re-opening and re-saving the same already-compressed lossy copy over and over.