Apple Music Hear your music the way it was mastered. Get up to 3 months of Apple Music free, with lossless audio and Dolby Atmos. Try it free Ad · New subscribers only
SoundBench فارسی
Guides

How to Check FLAC File Integrity

A FLAC file can fail in two different ways: it can be damaged, or it can be a fake made from an MP3. Here is how to check for both.

FLAC was designed to be verifiable. Every file stores an MD5 checksum of the original audio, and every frame inside it has its own CRC checksum. That makes it possible to prove that a file decodes to exactly the audio it was made from, bit for bit.

This test answers one question: is the file damaged? It does not tell you whether the audio inside was lossless to begin with. A FLAC made from a 128 kbps MP3 passes the integrity test perfectly. The quality check is a separate step, covered at the end of this guide.

How FLAC protects itself

CheckWhat it coversWhat a failure means
Frame CRC-8 and CRC-16Each small block of audio and its headerBytes in that block were changed or lost
MD5 signatureThe whole decoded audio streamThe audio is not identical to what was encoded
File structureHeaders, metadata blocks, frame orderTruncated download, bad copy or broken tagging

Method 1: flac -t (the official tool)

The reference FLAC command-line tool, available for Windows, macOS and Linux from xiph.org, has a test mode that decodes the file without writing anything and compares the result with the stored MD5.

Run flac -t "song.flac" for one file, or flac -t *.flac for a whole folder. A healthy file ends with ok. Errors such as LOST_SYNC, BAD_HEADER, FRAME_CRC_MISMATCH or MD5 signature mismatch mean the file is damaged.

If you see a warning that the MD5 signature is unset, the encoder that made the file did not store a checksum. The frames can still be checked, but the full bit-for-bit comparison is not possible.

Method 2: foobar2000

On Windows, foobar2000 can test many files at once: select the tracks, right-click and choose Utilities, then Verify Integrity. It lists every file with problems and the kind of error found. It is a good choice for checking a whole library after copying it to a new drive.

What to do with a damaged file

  • Download or rip it again. Damage usually comes from an interrupted download, a failing drive or a bad copy.
  • If you made the file yourself, re-encode it from the original WAV or CD.
  • Keep backups, and test them too: a backup of a damaged file is still damaged.
  • Do not trust a repair tool that claims to restore missing audio. It can only skip or silence the broken frames.

Passing the test does not mean it is really lossless

A file that passes flac -t is intact, but intact is not the same as lossless. If someone converted an MP3 to FLAC, the MD5 simply describes the MP3-quality audio, and every check passes.

To find those files you have to look at the sound itself: lossy encoders cut off the highest frequencies, and that cutoff stays visible in a spectrogram. The SoundBench Quality Analyzer does this in your browser without uploading the file, and gives a verdict with the detected cutoff frequency.

Frequently asked questions

Can FLAC files become corrupted on their own?

Not by sitting on a healthy drive. Corruption comes from failing storage, interrupted downloads or copies, or software that wrote the file badly. Regular backups and an occasional integrity check catch it early.

Is there an online FLAC validator?

Full MD5 verification needs a decoder that reads every frame, so flac -t or foobar2000 are the reliable tools. Online tools are best for the other question, whether the file is genuinely lossless, which needs only a spectrum analysis.

Does changing the tags break the MD5?

No. The MD5 covers only the audio. Editing tags or cover art changes the file but not the audio, so the integrity test still passes.

My FLAC plays fine. Do I need to test it?

A small error can play as a short click or a skipped moment that is easy to miss. Testing is worth it for an archive you plan to keep for years.

Related tools