Lossless vs. Lossy Compression: What Actually Gets Removed
Learn how lossless and lossy compression differ, what each one throws away, and which to choose for photos, music and documents.
When a file gets smaller, something has changed. The question is whether the change can be undone. That is the heart of the difference between lossless and lossy compression, two ideas that quietly shape photos, music, videos and archives. Knowing which is which helps you avoid damaging files you care about.
The core idea
Compression works by finding a more efficient way to store information. With lossless compression, the original data can be rebuilt exactly, bit for bit, when you open the file. With lossy compression, some data is permanently thrown away to make the file much smaller. The result looks or sounds close to the original, but it is not identical.
How lossless compression works
Imagine a line of text that repeats the same phrase many times. Instead of writing it out every time, you could write it once and note that it repeats. Lossless methods do something similar with patterns in data. Archive formats like ZIP use lossless compression, which is why you can extract a file and get exactly what you put in. If you want the basics of archives, see ZIP files explained: what they do and when to use them.
Lossless compression is essential for documents, spreadsheets, software and anything where a single wrong character could cause damage. It also applies to some image and audio formats designed to preserve full quality.
How lossy compression works
Lossy methods rely on the limits of human senses. A photo has fine color differences our eyes cannot easily separate, and music contains sounds that are masked by louder ones. The compressor discards that detail, reducing size dramatically. Common lossy formats include JPEG for images and MP3 and AAC for audio. Many video formats are lossy as well.
The key point is that the loss is permanent. If you save a lossy file at low quality, you cannot restore the discarded information by converting it to a higher quality setting later.
The generation loss problem
Every time you edit and re-save a lossy file, another round of data may be discarded. After many cycles, you may see blocky patches, smeared edges or muddy sound. This is why photographers and editors keep original files and make copies for sharing. Treat your original as the master and only ever export copies from it.
Which should you choose?
A useful rule is to match the compression to the purpose:
- Archiving and editing: use lossless, or keep the original.
- Sharing and publishing: lossy is usually fine and keeps files light.
- Text, code and data: always lossless.
- Casual music and video listening: lossy is usually enough for everyday use.
Test with your own eyes and ears
Save a file at a few different quality settings and compare. At moderate settings, many people cannot tell the difference between a good lossy file and the original in everyday use. At very low settings, problems become obvious. Trust your own judgment for your own use.
Do not compress twice for nothing
Compressing a file that is already compressed rarely saves much space. A ZIP of a folder of JPEG photos is usually about the same size as the folder itself. Save your effort for files that benefit.
Frequently asked questions
Can I make a lossy file lossless again? No. You can save it in a lossless format, but the lost detail does not come back, and the file will simply be larger.
Is lossy compression bad? Not at all. It is a practical trade of detail for size, as long as you keep originals when quality matters.
Which is better for backups? Back up the original files as they are. Do not convert them to lossy formats for storage if you may need full quality later.