Skip to content
All guides

Guide

Lossy vs lossless, in practice

The short answer

Lossless compression stores the file in less space and gives back every original bit. Lossy compression throws away detail it judges you will not notice and cannot get it back. Lossy is right for finished files people look at or listen to; lossless is right for anything you will edit again.

By Updated How we write these

What lossless means

Lossless compression works the way a zip file does: it finds patterns and describes them more briefly. Decompress it and you have exactly what you started with, bit for bit. PNG, FLAC and ZIP all work this way.

The catch is how much it can save. Photographs and recorded audio are close to noise at the fine detail level, and noise does not compress. A lossless photo might come down by 20 or 30 per cent; a lossy one comes down by 90.

For line art, screenshots, text and silence, lossless does far better, because those really are made of repeating patterns.

What lossy throws away

Lossy formats are built on what human perception misses. JPEG discards fine colour detail because eyes are much more sensitive to brightness than colour. MP3 and AAC drop sounds masked by louder sounds nearby. Video codecs store the differences between frames rather than every frame.

The discarded detail is gone. That is not a problem in itself — the point is that you cannot tell — but it becomes one when the file is edited and saved again.

Generation loss, the thing that actually bites

Every time a lossy file is decoded, changed and re-encoded, a fresh round of detail is discarded, this time from an already-degraded picture. Do it enough times and the result is visibly mushy: the "deep fried" look of a meme that has been re-shared a hundred times.

Practical rule: edit from the most original file you have, and export to a lossy format once, at the end. Never use a lossy export as your working master.

Conversions that avoid re-encoding entirely are worth seeking out. Trimming an MP3 on a frame boundary or cutting a video on a keyframe copies the data across untouched, so no generation is lost — which is why Trim Audio and Trim Video say when they have managed it.

Which to pick

Lossless when you will edit it again, when it is an archive or master, when the content is a screenshot, diagram, logo or anything with hard edges, or when someone downstream has specified it. PNG for images, FLAC or WAV for audio.

Lossy for everything that is finished and going out into the world: photos on a website, video anywhere, music on a phone, anything with a size limit attached. JPG, WebP or AVIF for images, AAC or MP3 for audio, H.264 or AV1 for video.

Both, when storage allows. Keep the lossless master, export lossy copies as needed, and never edit the copies.

Formats mentioned

Questions

Is PNG always better than JPG?

No. PNG is better for screenshots, logos and anything with sharp edges or transparency; for photographs it produces a file several times larger with no visible benefit. PNG vs JPG goes through it.

Does converting lossless to lossless lose anything?

No. FLAC to WAV, or PNG to a lossless WebP, is an exact transcription. Only the file size and compatibility change.

How many times can I re-save a JPG before it looks bad?

There is no fixed number — it depends on the quality setting and whether the image is re-cropped. Two or three careful saves are usually invisible; ten are usually not.

Read next

Tools for this