iLoveConverter
Categories 11 categories
Audio FLAC

The FLAC (.flac) Format, Explained

iLoveConverter Team 3 min read

On this page

FLAC — Free Lossless Audio Codec — is the gold standard for audio archiving. Unlike MP3 or AAC, which throw away frequencies humans supposedly cannot hear, FLAC preserves every sample exactly. A FLAC file decoded to WAV is byte-for-byte identical to the original recording. That is why audiophiles and streaming services like Tidal and Qobuz use it for high-fidelity playback.

How FLAC works

At a high level FLAC is predictive coding:

  1. It splits the audio into small subframes and observes the pattern.
  2. It fits a linear polynomial predictor to each subframe.
  3. It stores only the residual — the difference between the predicted and the actual sample.
  4. Because residuals are small and repetitive, entropy coding (Rice coding) compresses them further.

This produces typical compression of 2:1 to 4:1 versus uncompressed PCM WAV. Classical music compresses more than noisy rock, but every bit of the original survives.

Container and metadata

A .flac file is both a codec and a container. The container stores:

  • A STREAMINFO block at the beginning with sample rate, channels, bit depth, total samples, and an MD5 of the uncompressed audio.
  • One or more VORBIS_COMMENT blocks holding artist, album, track, genre, cover art, and any custom tags.
  • An optional PICTURE block for embedded album art (JPEG or PNG).
  • The audio data as a series of frames, each with a sync code, sample count, and CRC.

The MD5 checksum in STREAMINFO lets you verify losslessness after any transcoding — decode FLAC to WAV, compute its MD5, and it must match.

When to use FLAC

  • Archiving — you want the master copy and may transcode to smaller formats later.
  • Hi-Fi playback — DACs and amplifiers benefit from bit-perfect sources.
  • Source material for conversion — always start from lossless; re-encoding MP3 to AAC degrades quality.
  • Professional editing — no generational loss when applying effects multiple times.

When not to use FLAC

  • Bandwidth-limited streaming — use AAC or Opus; they are 10× smaller.
  • Mobile with tight storage — 1000 FLAC tracks eat 30–60 GB.
  • Legacy hardware — some old car stereos and portable players do not support FLAC.

Converting to and from FLAC

Common command-line workflows:

ffmpeg -i input.wav -c:a flac output.flac
ffmpeg -i input.flac -c:a pcm_s16le output.wav
ffmpeg -i input.flac -c:a libmp3lame -q:a 2 output.mp3

flac command:

flac file.wav          # encode
flac -d file.flac      # decode
flac -t file.flac      # verify only

For batch conversion, always test one file first and keep the originals until you are sure.

Common problems

  • “Not a valid FLAC” — the file may be OGG containing FLAC (.oga); FLAC data inside OGG is valid but has a different magic header.
  • Tag loss after conversion — not all converters copy VORBIS_COMMENT or PICTURE blocks; use tools that do.
  • Sample rate mismatch — if a converter resamples on encode, you lose information; disable resampling unless explicitly needed.
  • False positives on corruption — verify with flac -t; some players decode truncated files with glitches but do not fail loudly.

FAQ

Is FLAC better than ALAC?

Both are lossless. FLAC is open-source and patent-free; ALAC is Apple’s format. Quality is identical, but FLAC has broader device support outside Apple’s ecosystem.

Does FLAC sound better than WAV?

No. If the FLAC was encoded from that WAV with no other processing, they decode to the exact same PCM samples. The difference is file size only.

Can FLAC be used in OGG or MP4?

Yes. FLAC data can be wrapped in an OGG container (.oga) or in MP4/MKV. These are still lossless but have different file extensions.

How much space does FLAC save?

Typical 50–70% reduction compared to WAV. Very dynamic material (classical, jazz) compresses more; heavily distorted rock compresses less. Always use lossless, not MP3, as your archive master.

Try it yourself — free, right in your browser

Everything mentioned in this guide runs locally on this site: no upload, no watermark, no sign-up.

Format deep-dives: FLAC (.flac) , WAV (.wav) , MP3 (.mp3) , AAC (.aac) , OGG (.ogg.oga)