How to Fix a Corrupted Audio File
The file will not open. Playback stops midway. There are clicks, pops, and silence where audio should be. Audio file corruption happens from interrupted transfers, failing drives, and software crashes. Here is how to recover as much as possible.
Diagnose the Problem
First, determine what kind of corruption you are dealing with. File opens but sounds wrong: partial corruption — some data is intact. File shows wrong duration: header corruption — the metadata is damaged but audio may be fine. File does not open at all: severe corruption or wrong format. File opens in one player but not another: may be a format issue, not corruption. Try VLC first — it handles damaged files better than any other player. If VLC plays it, the audio data is at least partially intact.
Try Different Players and Tools
VLC: The most forgiving player. It skips damaged sections and plays what it can. FFmpeg: Try converting the file. Run ffmpeg -i damaged.mp3 recovered.wav. If FFmpeg can read the audio stream, this extracts the good data into a clean WAV. Audacity: Import the file. Audacity may recover audio even when other tools fail. If import works, immediately export to a new file. MP3val: Specifically repairs damaged MP3 files by fixing frame headers. Free and open-source.
Repair Header Corruption
The file header contains metadata about format, duration, and encoding parameters. If only the header is damaged, the audio data may be perfect. MP3: Headers repeat with every frame. MP3val or mp3diags can rebuild them. WAV: A damaged RIFF header can be reconstructed if you know the sample rate, bit depth, and channel count. Tools like WAV-repair can rebuild WAV headers. FLAC: The flac command-line tool can check and repair FLAC files: flac --test file.flac to verify, flac --decode to extract audio.
Recover from Partial Files
Interrupted downloads and incomplete transfers leave truncated files. The audio from the beginning up to the cutoff point may be perfect. FFmpeg can often extract the valid portion: ffmpeg -i partial.mp3 -c copy recovered.mp3. For WAV files, you can sometimes fix the RIFF header's size field to match the actual file size. The audio will be shorter than intended but the existing data will play correctly.
Prevention
Always verify file transfers. Compare file sizes between source and destination. Use checksums for important files — FLAC includes built-in integrity verification. Copy files to external drives safely — use your OS's eject function before removing USB drives. Back up important recordings to multiple locations. Keep copies on different drives or in cloud storage. If a drive shows signs of failure (slow reads, clicking sounds), copy everything off it immediately before it gets worse.