AudioUtils
Audio Glossary

What Is Lossless Audio Compression?

Lossless compression reduces audio file size without losing a single bit of data: decompress the file and you get back the exact original, sample for sample. FLAC, ALAC, and WavPack are the audio world's equivalent of ZIP — except purpose-built for sound, which is why they compress music far better than a general-purpose archiver can. This is a complete plain-English reference: how prediction and residual coding shrink audio reversibly, why audio needs its own lossless codecs instead of ZIP, the major formats compared, what compression ratios to expect and why they vary, how lossless differs from uncompressed and from lossy, the built-in integrity checking that makes lossless ideal for archives, and the common misconceptions worth clearing up.

How Lossless Compression Works

Lossless codecs shrink audio by finding and eliminating mathematical redundancy, never by discarding content. Real-world audio is highly predictable over short spans: each sample tends to be close to a value you could guess from the samples before it. A lossless encoder exploits this by modeling the waveform, storing the model plus only the small errors between prediction and reality, and packing those errors with efficient entropy coding. Silence compresses to almost nothing; repetitive or tonal material compresses very well; dense noise barely compresses, because noise is by definition unpredictable. Crucially, every step is exactly reversible — the decoder runs the same model, adds back the stored errors, and reconstructs the original PCM bit for bit. There is no psychoacoustic model, no masking threshold, no judgment about what you can hear; the output is not an approximation but the input itself, verified in formats like FLAC by a built-in checksum. That reversibility is the entire definition: if decoding does not reproduce the source exactly, the codec is not lossless.

Prediction and Residual Coding

The two-step engine inside virtually every lossless audio codec is predict-then-encode-the-difference. Prediction: the encoder processes audio in frames and, for each, fits a mathematical predictor — often Linear Predictive Coding (LPC), which estimates each sample as a weighted combination of the previous few samples. Because music is locally smooth and periodic, these predictions land very close to the true values. Residual coding: the encoder stores only the residuals — the small differences between predicted and actual samples — using entropy codes like Rice/Golomb coding, which represent small numbers in very few bits. Since good prediction makes most residuals tiny, the total shrinks dramatically. Stereo adds another trick: the two channels usually resemble each other, so encoding mid/side (their sum and difference) instead of left/right removes inter-channel redundancy. Codecs also let you trade encoding effort for size — FLAC's levels 0-8, for instance, search harder for better predictors at higher levels — but every setting remains perfectly lossless; only encode time and file size change, never fidelity.

Why Not Just ZIP an Audio File?

A natural question: WAV files are just data, so why not compress them with ZIP? You can — and the result is disappointing, typically shaving only a few percent where FLAC achieves 40-50. The reason is that general-purpose compressors like ZIP's DEFLATE look for repeated byte sequences — literal patterns that recur exactly — which text and program files are full of but raw audio samples almost never contain, because even a repeating musical phrase never repeats sample-for-sample at the byte level. Audio's redundancy lives elsewhere: in the smooth, predictable evolution of the waveform from one sample to the next. Dedicated lossless audio codecs attack exactly that structure with waveform prediction, which is why FLAC routinely halves a file that ZIP barely dents. The same logic explains why FLAC cannot compress noise (unpredictable) and why compressing an MP3 with anything achieves nothing (its redundancy has already been squeezed out). The lesson: compression works by modeling the data's structure, and audio needs an audio-shaped model.

Common Lossless Formats

Four names cover the lossless landscape. FLAC (Free Lossless Audio Codec) is the open-source standard and the right default: patent-free, supported on Android, iOS/macOS (since 2017), Windows, and most browsers, with strong metadata and integrity checking. ALAC (Apple Lossless) is Apple's equivalent — open-source since 2011, similar compression, chiefly useful inside Apple's ecosystem where its integration with the Music app is smoothest; FLAC and ALAC convert to each other losslessly. WavPack is the flexible power tool, notable for its hybrid mode: it can produce a small lossy file plus a correction file that together reconstruct the lossless original — useful for carrying a compact copy while archiving perfection. APE (Monkey's Audio) squeezes out slightly higher compression ratios at the cost of much slower, CPU-heavy decoding and weaker device support, which keeps it niche. WMA Lossless exists as a Windows legacy. For almost everyone the practical answer is FLAC, with ALAC as the Apple-workflow alternative — the rest are situational.

Compression Ratios

Lossless compression typically lands between 30 and 60 percent size reduction, and — unlike lossy bitrate — the ratio is not a quality setting but purely a function of the audio content, because quality is always perfect. Predictable material compresses best: solo piano, quiet acoustic recordings, and speech can shrink below half size; silence collapses to almost nothing. Dense, loud, noise-like material compresses worst: heavy metal, distorted guitars, hard-limited modern masters, and cymbal-heavy mixes may only reach 60-70 percent of original size, and pure noise barely compresses at all. Concretely, a CD-quality album around 600 MB as WAV typically becomes 300-400 MB as FLAC. Higher sample rates and bit depths compress proportionally, so a 24-bit/96 kHz master remains large even as FLAC. Encoder settings (like FLAC -0 through -8) nudge the ratio by a few percent in exchange for encode time, with decode cost essentially unchanged. If two encodes of the same file differ in size, they still decode to identical audio — size differences in lossless never mean quality differences.

Lossless vs Uncompressed

Uncompressed formats — WAV and AIFF — store raw PCM samples directly with no compression; lossless formats — FLAC and ALAC — store the same samples compressed reversibly. The decoded audio is bit-for-bit identical, so there is no sound-quality difference whatsoever between a WAV and the FLAC made from it; anyone claiming WAV 'sounds better' is describing expectation bias. The real differences are practical. FLAC wins on storage (roughly half size), metadata (proper tags and cover art versus WAV's unreliable tagging), and integrity (a built-in checksum verifies your archive hasn't corrupted — WAV has nothing comparable). WAV wins on zero-decode simplicity: every DAW and editor manipulates it natively without decompression, which is why production and editing still favor WAV, and on absolute universality in professional tools. The sensible split: work in WAV while recording and editing, then store and share in FLAC. Converting between them is completely lossless in both directions, so nothing is ever at risk in that round trip.

Lossless vs Lossy

Lossless and lossy compression are different tools, not competitors on a quality ladder. Lossless (FLAC, ALAC) is reversible: roughly half the size, exactly the original audio back on decode, safe to re-encode and convert forever. Lossy (MP3, AAC, Opus) is one-way: a tenth of the size or less, achieved by permanently discarding perceptually-masked detail, with damage that compounds across repeated encodes. Choose lossless whenever the audio has a future — archiving, editing, mastering, building a library you may later convert to whatever format the future prefers. Choose lossy for final delivery to listeners, where a transparent encode is audibly indistinguishable and the bandwidth savings are decisive. In blind listening tests, a well-made high-bitrate lossy file is transparent for nearly all listeners — so the case for lossless is not everyday audibility but insurance, editability, and generational safety: a FLAC can father a thousand future MP3s, but an MP3 can never give back what its encoder threw away.

Integrity Checking and Metadata

Two under-appreciated features make lossless formats — FLAC especially — ideal for long-term archives. Integrity verification: FLAC's header stores an MD5 checksum of the original uncompressed audio, so a single command (flac -t) can verify, years later, that a file still decodes to exactly the bits that were encoded — catching the silent corruption (bit rot, bad copies, failing drives) that would otherwise go unnoticed until too late. WAV offers nothing comparable, which is a real argument for FLAC over WAV as an archival format, beyond the size savings. Metadata: FLAC and ALAC carry rich, standardized tags — artist, album, track numbers, embedded cover art, ReplayGain loudness data — that survive transfers between players and platforms; FLAC uses the flexible Vorbis-comment system, ALAC the MP4 tagging family. This means a lossless library is self-describing and self-verifying: every file knows what it is and can prove it is undamaged. For irreplaceable recordings, those two properties are worth as much as the perfect audio itself.

Common Misconceptions

Three misunderstandings cause most lossless-related mistakes. First: converting a lossy file to FLAC does not improve it. An MP3 turned into FLAC is just a large, faithful copy of the MP3's already-approximated audio — the discarded detail is gone forever. The FLAC label promises the file matches its source, not that the source was good. Second: lossless does not mean well-mastered. A brick-walled, harshly-limited master in FLAC sounds exactly as crushed as it did in the studio; format preserves quality, it cannot add it. A great master in a good lossy encode beats a poor master in lossless every time. Third: higher FLAC compression levels do not reduce quality. Levels 0-8 trade encoding time for file size only; every level decodes to identical audio. Related: two lossless files of different sizes can still be audibly and mathematically identical. The unifying principle behind all three: lossless is a transport guarantee — what goes in comes out — and everything about how the audio actually sounds was decided before encoding.

When to Use Lossless

Use lossless wherever audio has value beyond a single listen. Archival: rip CDs and store masters in FLAC so the full quality survives indefinitely, protected by checksums. Production: keep stems, session exports, and masters lossless so every future edit and encode starts from perfection. Music libraries: a FLAC library never degrades and can generate any lossy format the future demands — encode once to your phone's format of the day, keep the source forever. Distribution to platforms: streaming services and distributors want lossless uploads (FLAC or WAV) and handle their own delivery compression. Critical listening: on revealing equipment in quiet rooms, lossless removes any question of encoding artifacts. Sharing between collaborators: mixes and references travel in FLAC when WAV is too large for the pipe. Skip lossless only at the last mile — final delivery to listeners over constrained bandwidth — where a transparent lossy encode does the job at a tenth of the size.

How to Convert To and From Lossless

The conversions worth knowing, and their guarantees. WAV or AIFF to FLAC/ALAC: perfectly lossless, roughly halves the size, adds metadata and integrity checking — the standard archival move. FLAC to ALAC (or back): lossless in both directions; use it to move between open ecosystems and Apple's. FLAC/ALAC to WAV: lossless; the usual step before editing in tools that prefer raw PCM. Lossless to lossy (FLAC to MP3/AAC/Opus): the correct way to produce delivery files — one clean lossy generation from a perfect source, at 192-320 kbps for music. Lossy to lossless (MP3 to FLAC): harmless but adds no quality — only do it if a workflow demands a lossless container. AudioUtils runs every one of these conversions entirely in your browser via FFmpeg WebAssembly: no upload, no signup, no install, and your files never leave your device — even large lossless masters are processed locally on your own machine.