Skip to content
Morphr

Lossy vs Lossless: What Actually Happens When You Compress a File

By Andrew Butson · July 2, 2026 · 7 min read

Every conversion falls into one of two buckets: lossy, where the encoder throws detail away to save space, or lossless, where every bit of the original survives. The distinction sounds simple and has one very unforgiving consequence: once detail is thrown away, no later conversion can bring it back, no matter what format you save it into next.

This guide covers the actual mechanics: what a lossy encoder is allowed to discard and why you usually can't see it, why a lossless format can still compress at all, what happens when you re-save a lossy file repeatedly, and how to apply all of it to images, audio and video without losing something you'll want later.

What a lossy encoder throws away

Lossy compression works because human eyes and ears are bad at noticing certain kinds of change, and encoders are built around models of exactly that weakness. A JPEG or MP3 encoder doesn't compress a file the way a zip tool does: it analyses the content, decides which parts a person is unlikely to perceive, and deletes those parts outright before the remaining data is packed down further.

In images, the biggest saving usually comes from chroma subsampling: the eye is far more sensitive to changes in brightness than to changes in colour, so most lossy image and video encoders keep full resolution for brightness and quietly store colour at half or quarter resolution, then reconstruct it on playback. Combined with rounding off the fine, high-frequency detail in each small block that contributes least to how the image looks, that's most of where a JPEG's file-size saving comes from. In audio, MP3 and AAC use a related idea called a psychoacoustic model: quiet sounds masked by louder ones nearby, and frequencies at the edges of hearing, are reduced or removed because most listeners won't consciously notice.

None of this is free. Push the compression far enough, such as a very low JPEG quality or a very low MP3 bitrate, and the shortcuts become visible or audible: blocky artifacts and colour bleeding in images, a thin, swishy quality in audio. A good lossy encoder is one that picks a point where the savings are large and the loss isn't.

Why lossless compression works at all

If nothing is thrown away, how does a lossless format shrink a file? Redundancy. Real files are full of repeated and predictable patterns, such as a run of identical pixels in a screenshot's background or a repeated phrase in a text file, and a lossless compressor's job is to spot that redundancy and record it more compactly, in a way that can be perfectly reversed. PNG does this with a general-purpose compression scheme, similar in spirit to a zip archive, after a filtering step that makes image data more predictable row to row. FLAC does something similar for audio, predicting each sample from the ones before it and storing only the usually-small error.

The catch is that redundancy varies wildly by content. A screenshot or a synthesizer-heavy track compresses a lot, because there's real repetition to exploit. A photograph of a forest or a live orchestral recording compresses much less, because the detail is closer to genuinely random from the compressor's point of view: there's little pattern left to pack away. That's part of why a lossless PNG of a photo can end up disproportionately large next to a lossless FLAC of a song: photographic detail is simply less compressible than most audio waveforms.

Convert without the guesswork

Morphr handles both directions (lossy targets like JPEG, WebP and MP3, and lossless targets like PNG, TIFF, FLAC and WAV), entirely in your browser, with nothing uploaded.

Runs entirely in your browser — nothing is uploaded.

Generation loss: why re-saving a lossy file keeps hurting it

A single lossy save is usually safe: a well-encoded JPEG or MP3 at a sensible quality setting is very hard to tell from the source. The damage compounds when a lossy file is decoded, edited and re-encoded lossy again and again. Each re-encode applies a fresh round of 'what can I throw away' decisions to a file that already has less real detail in it than the original, so successive generations lose a little more. This is generation loss: the same effect that made a photocopy of a photocopy blurrier, one generation at a time.

This is why keeping a source file around matters more than people expect: if a JPEG is going to be cropped and resaved five times over a project's life, working from the original each time, or from an intermediate lossless copy, avoids stacking five separate rounds of compression loss on top of each other.

The one-way street: why lossy to lossless can't restore anything

This is the fact that trips people up most: converting a lossy file into a lossless format doesn't undo the compression. A JPEG converted to PNG becomes a perfectly exact copy of the JPEG's current pixels, artifacts included, just in a format that won't degrade further from here. It does not, and cannot, reconstruct the detail the JPEG encoder discarded when it was first saved. Lossy compression is a one-way door: once information is gone, no downstream conversion gets it back, because a converter can only work with the bits actually present in the file, not the ones the original encoder deleted.

Practically, that means the moment to choose lossless is before the first lossy save, not after. Converting an already-lossy file to a lossless format is still occasionally useful — it stops further degradation and satisfies a tool that demands a lossless input — but budget for a larger file, and don't expect a quality gain that isn't there to get.

Where each belongs: images, audio, video

The same trade-off repeats across every kind of media, with the same logic each time: lossy for delivery and everyday use, lossless for anything you might still need to edit, reprocess or archive.

An archival strategy that actually holds up

The practical rule that falls out of all this: keep one lossless, or original-lossy, master file per asset, and generate lossy copies from it on demand for whatever you're sharing or publishing that day. Never overwrite the master with a lossy export, and never treat a lossy copy as the thing to keep editing from. If storage is the constraint, a lossless format that still compresses, such as FLAC over WAV or PNG and high-quality TIFF over a raw bitmap, gets you most of the space saving without giving up the ability to start fresh later.

Converting between two lossy formats, JPEG to WebP or MP3 to AAC, is one lossy step, same as any other. Treat it the same way: fine occasionally, best avoided as a repeated habit on the same file.

Frequently asked questions

Does converting a lossy file to a lossless format improve its quality?
No. It freezes the file exactly as it is, artifacts included, in a format that won't degrade further, but it cannot restore detail the original lossy encoder discarded.
Is it safe to convert a photo from JPEG to PNG and back?
Converting JPEG to PNG loses nothing further, because PNG is lossless. Converting that PNG back to JPEG applies a fresh round of lossy compression, so do it once, not repeatedly: each lossy re-save compounds the loss.
Why can a lossless PNG end up bigger than a lossless FLAC of a whole song?
Because how much a lossless format shrinks a file depends entirely on how much repeating, predictable pattern is in the source. Photographic detail is close to random from a compressor's point of view; audio waveforms usually have more exploitable structure, so FLAC often compresses further relative to its uncompressed source than PNG does relative to a raw bitmap.
Should I archive my photos and music as lossless or lossy?
Lossless, if storage allows: TIFF or PNG for photos you might reprint or re-edit, FLAC or WAV for music masters. Keep the lossless master and export lossy JPEG or MP3 copies for everyday sharing.