Lossless vs Lossy Compression: What It Actually Means
Every image, audio and video format you have ever used relies on one of two compression strategies. Understanding the difference explains most of the surprising things that happen when you convert files.
Lossless compression
Lossless codecs reduce file size without discarding any information. Decompress the file and you get exactly the original data back, bit for bit. Think of zipping a text file — nothing is lost.
Examples: PNG, GIF, BMP, TIFF (LZW), FLAC, ALAC, WAV (uncompressed), ZIP, PDF (image-free text).
Trade-off: file sizes stay relatively large, especially for photographs.
Lossy compression
Lossy codecs exploit the limits of human perception. JPEG drops fine colour detail, MP3 drops frequencies you are unlikely to hear, H.264 drops information between frames. The result is dramatically smaller, and usually good enough.
Examples: JPG, WebP (lossy mode), HEIC, MP3, AAC, Opus, H.264, H.265, AV1.
Trade-off: quality is gone for good. Re-encoding an already-lossy file makes it worse — a phenomenon called generation loss.
The rule that trips everyone up
Converting from a lossy format to a lossless one does not restore quality. If you take a JPG and save it as PNG, the PNG faithfully preserves the artefacts the JPG already baked in, and the file gets bigger. You have paid for lossless storage of lossy data.
Going the other way — lossless to lossy — does lose quality, once. Converting a PNG screenshot to JPG is fine for email, but keep the PNG master for editing.
How to choose
- Intermediate editing: always lossless. Edit in PNG, TIFF, WAV or ProRes, then export.
- Final delivery to the web: lossy is usually right. JPG, WebP, MP3, AAC, H.264.
- Archival masters: lossless, and keep a copy of the original file.
A concrete example
You have a 24 MP phone photo. As HEIC it is 3 MB. Convert it to PNG and you get roughly 40 MB with no extra detail — HEIC already discarded that detail. Convert it to JPG at 85% quality and you get about 4 MB that looks the same as the HEIC. That is the whole trade-off in one file.