The difference
Lossless compression shrinks a file so that decoding gives back exactly the original bits, like a ZIP file. Lossy compression throws away detail that people are unlikely to notice, such as subtle color changes in a photo or very high frequencies in music, and gets much smaller files in return; what was discarded is gone for good. Choosing between them is a trade between size and fidelity, and the right answer depends on what the file is for and whether it will be edited again.
By type of media
| Media | Lossless | Lossy | Typical saving of lossy |
|---|---|---|---|
| Images | PNG, WebP lossless, AVIF lossless, GIF (256 colors) | JPG, WebP, AVIF, HEIC | 5 to 10 times smaller for photos |
| Audio | FLAC, ALAC; WAV and AIFF are uncompressed | MP3, AAC, Ogg Vorbis, Opus | MP3 at 192 kbps is about 7 times smaller than CD-quality WAV |
| Video | FFV1, ProRes 4444 XQ (near-lossless) | H.264, H.265, VP9, AV1 | essential: raw video is tens of GB per minute |
| Documents | ZIP, gzip, PDF text streams | images inside a PDF can be JPG | depends on the content |
Lossless compression works best on repetitive data (text, flat graphics); it cannot shrink a photo or a recording much, because they are full of noise that never repeats exactly.
Generation loss
Every time a lossy file is decoded and encoded again, a little more is lost, even at the same settings, and the artifacts of each round add up: blocks and halos in JPG, swirly "underwater" sound in MP3. Rules that avoid it:
- Keep a lossless master (the camera RAW or a PNG, the WAV or FLAC, the project file) and export lossy copies from it.
- Edit from the master, not from the last JPG or MP3.
- Converting lossy to lossless (JPG to PNG, MP3 to WAV) stops further loss but never restores quality; the file just gets bigger.
- Converting between two lossy formats (WebP to JPG, AAC to MP3) adds a generation: use a high quality setting.
Choosing in practice
- Photos for the web or messages: lossy, quality 75 to 90. Compress with the image compressor.
- Screenshots, logos, text: lossless PNG, or lossless WebP. See JPG vs PNG and AVIF vs WebP.
- Music archive: FLAC (WAV to FLAC); phone and car copies: MP3 or AAC (FLAC to MP3), or any format with the audio converter.
- Video to share: H.264 MP4 at a sensible bitrate, made smaller with the video compressor.
FAQ
Is PNG always better quality than JPG?
PNG is exact, so it never adds artifacts, but a PNG made from a JPG keeps the JPG's artifacts. For photos, a good JPG looks the same and is much smaller.
Can I tell if a file was compressed with loss?
Not from the extension alone for WebP and AVIF, which have both modes. Signs of lossy compression are blocky areas, halos around edges and smeared fine detail.
Is WAV lossless compression?
WAV usually holds uncompressed PCM audio, so it is lossless but not compressed. FLAC is lossless and about half to two thirds of the size.
Does zipping a JPG or MP3 make it smaller?
Barely. They are already compressed, so a ZIP saves a few percent at most.