AudioUtils

WAV to FLAC: Converting Without Any Quality Loss

Converting WAV to FLAC is perfectly lossless — no quality is lost. Learn why, how FLAC compression works, and the best settings for WAV to FLAC conversion.

WAV and FLAC are both lossless. Converting between them is not re-encoding the audio — it is reorganizing the same PCM samples into a different container with different compression behavior. You can convert WAV to FLAC, decode it back to WAV, and run a binary diff against the original PCM and the bytes will match exactly. The only thing the conversion changes is file size and what metadata the file can carry.

This is unusual. Most audio conversions involve a quality decision; this one does not. The questions are operational: how much smaller does the file get, what compression level should you pick, how do you verify the round-trip is bit-perfect, and when does WAV still make sense for your workflow.

Why WAV to FLAC Is Bit-Perfect

WAV stores raw linear PCM — the audio samples coming off your ADC, written to disk with a tiny RIFF header. FLAC stores the same PCM samples after running them through a predictor and an entropy coder. The predictor models each sample as a linear combination of the previous samples, then stores the residual (the prediction error) using Rice coding. Residuals cluster near zero and compress well. The decoder runs the predictor in reverse and reconstructs the original samples to the bit.

This is the same idea as ZIP compression, applied to a domain (audio) where the data has predictable structure. Nothing is rounded, nothing is approximated, nothing is psychoacoustically discarded. A WAV → FLAC → WAV round trip is bit-identical, which you can verify with 'md5sum' on the decoded WAV.

File Size: Typical 50% Reduction

For typical 16-bit/44.1 kHz stereo music, FLAC compresses to roughly 50-60% of the source WAV size. A 40 MB three-minute song WAV becomes about 22 MB FLAC. Compression ratio depends on content:

  • Dense music (full mixes, mastered material): 50-60% of WAV.
  • Sparse acoustic material (solo piano, voice): 40-50% of WAV — predictors work better on simpler signals.
  • Heavy distorted/noisy content (drum machines, noise music): 60-75% of WAV — less predictable signal, less room to compress.
  • Silence or near-silence: compresses to almost nothing.
  • 24-bit/96 kHz hi-res masters: 55-70% of WAV.

For a 1 TB library of 16-bit/44.1 kHz albums, you save roughly 400-500 GB by switching from WAV to FLAC. That is the main reason to convert — FLAC is the practical archival format, WAV is the practical working format.

Why Convert WAV to FLAC

  • Storage at scale. Halving library size matters for personal music collections, sample libraries, and broadcast archives.
  • Better metadata. WAV's metadata story is a mess — RIFF INFO chunks, BWF iXML, ID3 chunks bolted on by some tools, all inconsistently supported. FLAC has Vorbis Comments built into the spec, which every tagger handles cleanly. Album art, lyrics, replay gain, and custom fields all just work.
  • Built-in integrity check. FLAC stores an MD5 of the decoded PCM in the file header. Run 'flac -t album.flac' and the decoder verifies the file is uncorrupted by comparing the actual decode to the stored MD5. WAV has no equivalent — silent corruption goes undetected until you play the file.
  • Network streaming and library managers. Plex, Kodi, Jellyfin, Roon, foobar2000, and most network streamers handle FLAC natively with proper tag display. WAV often shows up as "Unknown Artist - Track 01" because the player cannot read the tags.
  • Distribution to archivists. Music industry archive standards (DDEX, Library of Congress NDSA) accept FLAC as a preservation-grade format alongside BWF.

Compression Levels 0-8

FLAC offers compression levels 0 through 8. Every level produces bit-identical decoded output — the difference is encode speed and final size:

  • Level 0: fastest encode, biggest file. Roughly 5-10% larger than level 5. Useful when you are encoding live and CPU is constrained.
  • Level 5: the default. Balanced encode speed and compression. Typical choice.
  • Level 8: slowest encode, smallest file. Roughly 1-2% smaller than level 5. The encode is 3-5x slower.

The difference between level 5 and level 8 is genuinely tiny — a 22 MB level-5 FLAC becomes about 21.7 MB at level 8 — and the encode-time penalty is real. For a library of thousands of files, level 5 is the right default. Save level 8 for one-off archive masters where the encode happens once.

Decode speed is identical across all levels. Higher compression does not slow down playback.

Browser-Based Conversion

The fastest path is the WAV to FLAC tool. It runs entirely in your browser via WebAssembly — files never leave your device, which matters when the WAVs are unreleased masters or client work under NDA. Step by step:

1. Open /wav-to-flac. 2. Drag in one or more .wav files. Multiple files queue automatically. 3. The tool encodes at compression level 5 by default. Sample rate, bit depth, and channel count are preserved exactly — 24-bit/96 kHz WAV produces 24-bit/96 kHz FLAC. 4. Download the .flac files individually or as a zip.

Going the other direction is also lossless: FLAC to WAV reverses the process for tools that only read WAV.

ffmpeg One-Liner

For batch work or scripting:

'ffmpeg -i input.wav -compression_level 5 output.flac'

Flag breakdown:

  • '-i input.wav' — source file. ffmpeg auto-detects PCM format from the WAV header.
  • '-compression_level 5' — FLAC level (0-8). Optional; defaults to 5 in ffmpeg.
  • 'output.flac' — output filename. ffmpeg uses the libFLAC encoder by default.

To copy the input sample rate and bit depth without resampling, no extra flags are needed — ffmpeg preserves them by default. To explicitly preserve 24-bit: '-sample_fmt s32' (FLAC stores 24-bit in 32-bit slots).

For batch conversion of an entire directory:

'for f in *.wav; do ffmpeg -i "$f" -compression_level 5 "${f%.wav}.flac"; done'

Verifying Lossless Integrity

FLAC's killer feature for archiving is the built-in MD5 of decoded PCM. Two ways to use it:

1. After encoding: 'flac -t output.flac' decodes the file and verifies against the stored MD5. Exit code 0 means the file is intact. 2. Round-trip check: 'flac -d output.flac -o roundtrip.wav', then 'cmp original.wav roundtrip.wav'. If cmp returns nothing, the round trip is bit-perfect. (You may need to ignore differences in the WAV header chunks, which FLAC does not preserve byte-for-byte; the PCM data block will match.)

This is what makes FLAC the right format for archives that need to outlive the original files. You can detect bit rot decades later.

Sample Rate, Bit Depth, and Hi-Res

FLAC supports sample rates up to 655,350 Hz (the spec's hard limit) and bit depths of 4-32 bits per sample. In practice the format covers everything WAV can hold:

  • 16-bit / 44.1 kHz (CD quality)
  • 16-bit / 48 kHz (DAT, broadcast)
  • 24-bit / 44.1, 48, 88.2, 96, 176.4, 192 kHz (studio masters and hi-res)
  • 32-bit float (recent FLAC spec extension; not all decoders support yet)

Converting WAV to FLAC preserves all of these without resampling. A 24-bit/192 kHz WAV produces a 24-bit/192 kHz FLAC.

DAW Workflow: WAV for Active, FLAC for Archive

Working DAWs (Pro Tools, Logic, Reaper, Ableton, Cubase) prefer WAV for the working session because:

  • Random-access seek is instant — no decode CPU needed.
  • Disk read speed is the only bottleneck on track count.
  • Edits and bounces are bit-fast — no encode step.

But once a project is finished, the masters do not need to live as WAV. Convert deliverable masters and stems to FLAC for long-term storage; the bit-perfect round-trip means you can decode back to WAV anytime a future revision is needed. This is the standard archival pattern: WAV in production, FLAC in the vault. The FLAC vs WAV for music production breakdown and the archiving guide cover the workflow trade-offs in more depth.

For a deeper look at why FLAC qualifies as truly lossless, see the lossless vs lossy explainer and the What is FLAC format reference.

Metadata: What FLAC Handles Better

WAV's metadata story is genuinely a problem at scale. The RIFF format defines an INFO chunk for basic tags, but in practice tools handle it inconsistently:

  • Some tools write metadata to RIFF INFO chunks; others write to BWF iXML; others bolt ID3v2 tags onto the front of the file (technically out-of-spec).
  • Album art is usually stored as a "LIST" chunk with custom encoding — different tools encode and decode it differently.
  • ReplayGain values, lyrics, and custom fields rarely round-trip cleanly between players.

The result: a 10,000-track WAV library tagged in iTunes often shows up as "Unknown Artist" in foobar2000 and vice versa.

FLAC uses Vorbis Comments natively, which every modern tool supports identically. Album art lives in a dedicated PICTURE block. ReplayGain is standardized in well-known tag names. This is one of the practical reasons archival workflows favor FLAC over WAV even though both are lossless.

Streaming and Library Manager Support

FLAC is a first-class citizen across modern audio infrastructure:

  • Plex, Jellyfin, Kodi, Roon, Emby: native FLAC support with full metadata.
  • Network streamers and DACs (Sonos, Bluesound, Naim Mu-so): native FLAC playback.
  • Foobar2000, MusicBee, MediaMonkey, VLC, Winamp: native FLAC.
  • iOS 17+ and macOS Music app: native FLAC since the Apple Music Lossless tier launched.
  • Android (Poweramp, VLC, Phonograph, the system player on most phones): native.

WAV plays everywhere too, but with worse metadata and no integrity verification. For library applications, FLAC is the right format.

ffmpeg Advanced: Forcing Specific Sample Rates and Bit Depths

For most cases, no special flags are needed — ffmpeg preserves source format. But sometimes you need explicit control:

  • Force 24-bit storage even from 16-bit source (rare): '-sample_fmt s32' (FLAC stores 24-bit in 32-bit slots; the underlying audio is still 16-bit precision but the wrapper allows 24-bit).
  • Resample to 44.1 kHz on the way in: '-ar 44100'.
  • Convert multichannel (5.1, 7.1) WAV to FLAC: ffmpeg handles multichannel automatically; no extra flags needed.
  • Strip embedded metadata during encode: '-map_metadata -1'.

For a clean archive build:

'ffmpeg -i master.wav -compression_level 8 -map_metadata -1 archive.flac'

This produces the smallest FLAC with no inherited metadata, then you add archive-grade tags afterward via metaflac or a tagger.

Round-Trip Verification: The Killer Feature

If you genuinely care about archival integrity, the workflow looks like this:

1. Convert WAV to FLAC: 'ffmpeg -i source.wav archive.flac'. 2. Verify the FLAC: 'flac -t archive.flac' — exits 0 if intact. 3. Decode back to WAV: 'flac -d archive.flac -o roundtrip.wav'. 4. Compare the PCM data: 'cmp <(ffmpeg -i source.wav -f s16le -) <(ffmpeg -i roundtrip.wav -f s16le -)'.

If cmp returns no output, the round trip is bit-perfect. Save the FLAC; the WAV is now redundant.

The MD5 stored in the FLAC header lets you re-verify integrity at any point in the future. Run 'flac -t archive.flac' on a 10-year-old file and FLAC will tell you whether bit rot has corrupted the audio. WAV provides no such guarantee.