Fundamentals

Lossy vs lossless

One idea explains most of the confusion around file conversion, and it takes two minutes to understand properly.

Published

The distinction

Lossless compression makes a file smaller by describing it more efficiently. Decompress it and you get back exactly what you put in, bit for bit. ZIP, PNG and FLAC all work this way.

Lossy compression makes a file smaller by throwing information away — specifically, information a human is unlikely to notice is missing. JPG, MP3, AAC and H.264 all work this way, and they achieve far smaller files than lossless ever could, precisely because they are allowed to discard.

Loss is permanent, and that is the part people miss

Once a lossy encoder discards something, it is gone. No later conversion recovers it. Converting an MP3 to FLAC produces a large, lossless file containing exactly the flaws of the MP3 — it stops further damage, but it does not undo any.

This is the single most common misunderstanding about file conversion, and it costs people real work: a photo repeatedly opened, edited and re-saved as JPG degrades a little each time, invisibly at first, then obviously.

Transcoding compounds

Converting between two lossy formats — MP3 to OGG, or M4A to MP3 — means decoding audio that has already been through one encoder and putting it through a second. The two make different assumptions about what is safe to discard, so the second one damages material the first had already thinned out.

The practical rule: always encode from the best original you have. If you still have the WAV or FLAC, encode from that rather than from an MP3 you made earlier.

When none of this matters

Plenty of the time, it genuinely does not. A 192 kbps MP3 made from a CD rip is indistinguishable from the source for most listeners on most equipment. A quality-0.92 JPG of a holiday photo is indistinguishable from the original at normal viewing size. Obsessing over generational loss in a file you will listen to once in a car is wasted effort.

The distinction matters when the file is a master — something you will edit again, archive, or re-encode later. Keep masters lossless. Distribute copies lossy. That single habit avoids almost every problem in this article.

Where each format sits

Lossless: PNG, BMP, FLAC, WAV, and the data formats — CSV, JSON, YAML — where a single changed character would be a bug rather than a compromise.

Lossy: JPG, WebP in its usual mode, MP3, AAC, Vorbis, Opus, and every common video codec including H.264 and VP8.

Try both kinds yourself: compress an image with lossy settings, or convert WAV to FLAC to see lossless compression shrink audio without changing a single sample.