How FLAC Works
FLAC stands for Free Lossless Audio Codec, and the word that matters most is lossless: it shrinks an audio file without throwing away a single sample. Where MP3 and AAC achieve small sizes by discarding sound the ear is unlikely to notice, FLAC keeps everything and instead compresses the data the way a ZIP archive compresses a document, by finding and removing mathematical redundancy. Decode a FLAC file and you get back the original PCM audio bit for bit, identical to the WAV it came from.
It does this in two stages. First, linear prediction: the encoder looks at each short block of audio and fits a simple mathematical model that predicts where the waveform is heading based on the samples just before it. Audio is highly predictable over short spans, so the model is usually close. Rather than store the actual samples, FLAC stores only the small residual, the difference between the prediction and the real sample, which is a much smaller number and therefore takes far fewer bits.
Second, those residuals are packed using Rice coding, an entropy-coding method that is extremely efficient for exactly the kind of small, clustered-around-zero numbers that prediction residuals tend to be. The combination typically compresses music to between 50% and 70% of the original WAV size, not as small as a lossy MP3, but with zero quality cost. A FLAC stream is laid out as a section of metadata blocks (tags, seek points, cover art) followed by the audio frames, and it carries per-frame and stream-level checksums so a player can detect if a file has been corrupted in storage or transfer.
FLAC exposes a compression-level setting from 0 to 8. Higher levels make the encoder work harder to find redundancy, producing a slightly smaller file at the cost of longer encoding time; decoding speed is essentially the same regardless of level. Because the output is lossless either way, the level only trades encode time against a few percent of file size, there is no quality decision to make.
History and Standardization
FLAC was created by Josh Coalson starting in 2000, at a time when the only ways to store lossless audio were bulky WAV files or proprietary formats. It quickly became the open alternative and was adopted by the Xiph.Org Foundation, the same non-profit that stewards Ogg, Vorbis, and Opus, which gave it a stable institutional home and a commitment to keeping it free.
For most of its life FLAC was defined not by a formal standards document but by its reference implementation and detailed format specification, which in practice worked well because the reference encoder and decoder were open and widely used. That changed in 2024, when the IETF published RFC 9639, giving FLAC a formal, vendor-neutral specification more than two decades after its first release, a notable milestone that cements its status as a long-term archival format.
Its openness is the main reason FLAC became the default for serious music archiving and high-resolution downloads. Because it is free of patents and licensing fees, hardware makers, software developers, and online stores could adopt it without cost, and it spread to network music players, phones, and dedicated hi-fi gear. Today it is the de facto standard for lossless music distribution outside Apple's ecosystem.
FLAC Compared to Other Lossless Formats
FLAC's main rivals are ALAC (Apple Lossless) and WMA Lossless (Microsoft). All three are lossless and produce similar file sizes, so the difference is not sound quality, it is openness and support. ALAC is now open-source but is most at home in the Apple ecosystem; WMA Lossless is tied to Windows and effectively legacy. FLAC, being free, open, and patent-unencumbered, has the widest cross-platform support of the three and is the safest choice for a library you want to keep for decades and play on any device.
Against a lossy format like MP3 or AAC, the trade-off is simple: FLAC files are several times larger, but they are an exact copy of the master, so they can be edited, re-encoded to any other format, and archived indefinitely without ever degrading. The usual workflow is to rip or record to FLAC as the master library, then generate lossy MP3 or AAC copies on demand for phones or streaming where size matters more than perfection.
Practical niceties round out the format: FLAC supports fast seeking (jumping to any point in a long file without scanning from the start), rich embedded metadata and cover art, and embedded cue sheets, which together make it convenient for storing an entire album as a single tagged file. Those qualities are why it became the archivist's and audiophile's format of choice rather than just a smaller WAV.