Find out what is wrong first
The checker reports three kinds of header damage: the file does not start with RIFF, a chunk claims more bytes than the file holds, or bytes are left over after the end of the RIFF chunk. Each needs a different fix, so run the check before changing anything.
The damaged sample reproduces the most common case. It is a 0.25 second tone whose RIFF and data size fields are zero, the state a recorder can leave behind if it stops before rewriting the header. The checker reports that the RIFF size is too small and that 4036 bytes follow the RIFF chunk.


Sizes are zero or too small
The audio is still in the file; only the sizes are wrong. Work on a copy. In a hex editor, set bytes 4 to 7 to the file size minus 8. Then find the data chunk and set the 4 bytes after its ID to the number of bytes from the end of that header to the end of the file, assuming data is the last chunk. Both values are little-endian.
For the 4044-byte sample, the RIFF size is 4036, written c4 0f 00 00. The data chunk starts at byte 36, so its size is 4044 - 44 = 4000, written a0 0f 00 00. If a recording stopped part way through a frame, round the data size down to a multiple of the block align from the fmt chunk. Run the checker again and it should report no issues.
ffmpeg can do the same: ffmpeg -i damaged.wav -c copy repaired.wav copies the audio into a new file with correct sizes. On the damaged sample, ffmpeg 7.0 printed corrupt packet warnings but wrote a valid 0.25 second file. ffmpeg also adds a small LIST INFO chunk naming itself. To skip the install, repair the WAV in the FFmpeg Runner in your browser.
The file is truncated
Here the header says more than the file holds, usually after an interrupted download or copy, and the checker reports how many bytes are missing. Get a complete copy if you can. If not, set the data size to the bytes present in the file, rounded down to the block align, and the RIFF size to the file size minus 8. The missing audio cannot be recovered.
The file does not start with RIFF
Look at the first four bytes. RF64 or BW64 means a large-file WAV variant that this site does not parse but many audio editors open. ID3, or the bytes ff fb, suggests an MP3 file with a .wav name. If the bytes look like random audio data, the header is missing altogether. Audacity can open such a file with File > Import > Raw Data, if you know the sample rate, encoding and channel count.
Questions
Can this site repair my WAV file?
No. It finds which field is wrong and by how much. You make the fix in a copy with a hex editor or ffmpeg.
Will fixing the header bring back lost audio?
It brings back audio that is still in the file but was hidden by a wrong size. Audio missing from a truncated file is gone.
Why do recorders leave broken WAV headers?
The final sizes are only known when recording stops, so they are written last. A crash, flat battery or removed card before that point leaves the placeholder values.
What is block align?
The number of bytes in one sample frame: channels times bits per sample divided by 8. It is at payload offset 12 of the fmt chunk.
Open the RIFF Checker with your own file, or download the sample used above.