Lossless vs. Lossy Compression
The difference between lossless and lossy image compression, how to tell which a format uses, and how to pick the right one for each job.
Every image format uses compression to make files smaller. The key question is whether that compression keeps every pixel exactly, or discards some detail.
Lossless
Lossless compression keeps the image identical. It finds efficient ways to describe the pixels, like noting that a row has 500 white pixels in a row instead of listing each one.
- Formats: PNG, lossless WebP, GIF (with limited colours), TIFF (usually).
- Best for: screenshots, logos, text, diagrams, cutouts, working files you'll edit again.
- Downside: photos produce large files.
Lossy
Lossy compression removes information people are unlikely to notice, like tiny variations in texture or colour. The image looks almost identical, but it isn't exactly the same.
- Formats: JPEG, lossy WebP, AVIF, HEIC.
- Best for: photos for the web, email and sharing.
- Downside: artefacts at low quality; quality loss with repeated saving. See why quality drops with repeated saves.
Can you tell by looking?
At high quality, lossy images look the same as lossless to most people. At low quality, artefacts appear: blocks in smooth areas, halos around edges and smudged fine detail.
Converting between them
- Lossless to lossy: fine for a final export, but keep the lossless original.
- Lossy to lossless: saving a JPEG as PNG doesn't restore lost detail. It just stores the already-compressed image exactly, often in a larger file.
A sensible workflow
- Keep originals unchanged.
- Work in lossless formats if you edit in several stages.
- Export to lossy formats once, at the end, for sharing.
Cutouts
Cutouts with transparency need PNG, WebP or AVIF. Lossy WebP and AVIF keep transparency with smaller files; PNG keeps every pixel perfectly. See PNG vs. JPEG and image compression basics.