I am trying to find a command line program (Windows or Linux) that can check .WAV files, to see if they are complete, with no corruption or sudden endings.

While I have found several programs that can do this with .mp3 files, I cannot find anything that can do it with .WAV files, apart from a couple of commerical Windows programs that only use a GUI and so cannot be used in scripts.

  • 1
    Got a broken file that can be tested upon? May 5, 2011 at 17:28
  • @Ignacio: I have some, but it will take some time for me to find them out of thousands of files, which is why I need this in the first place. I'll get back to you if I find one.
    – paradroid
    May 5, 2011 at 18:42
  • You could probably just use dd to cut one short, say the first few tens of kilobytes from a multi-megabyte file. Also, are they all PCM, or do they use other encodings as well? May 5, 2011 at 18:45
  • 1
    I wonder if there's something in shntool that may be of use?
    – boehj
    May 6, 2011 at 18:24
  • This question belongs to softwarerecs.stackexchange.com - oh but it's too old.
    – Daniel W.
    Jan 2, 2017 at 14:07

3 Answers 3


Here's an article about what the wav format spec looks like:


Should be able to write a little script of some kind to check out the headers and make sure they look OK.



Here's a small utility that may suit your need. It checks the file, outputs some information on the file, and exits. The return code is 0 if successful, nonzero if there's a problem with the file.

It is written in Python and depends on the Python wave library. You can extract the .py file from the zip and examine/run independently, or use the compiled exe along with the support files included.

Seems to work OK for e.g. files output by lame --decode, and catches when I truncate a WAV (checks to make sure the file size is sane).

There is no way to determine if the PCM data has been corrupted without e.g. external checksums, etc.


Added a bit better error checking. Compiled exe version freaks out when wavcheck.py is in the same folder, so I stuck it in a subfolder (/src). Lol. Updated link above to new file.


I took a look at shntool as suggested by @boehj -- looks like good software for checking WAV files, and it has nice detailed output. Its output could be trivially parsed or its source code modified to allow for an all-OK exit status in 'info' and/or 'len' mode. As it stands, it has exit code 0 even when it is reporting problems with the file.

Homepage for shntool: http://shnutils.freeshell.org/shntool/

Update: Since everything in this post was stale for years, I linked to a different article about the wav format, and uploaded the code I wrote and compiled software to github, and updated the link to point to it. Tested the software in Win10 and it does seem to still work on basic LPCM wav files. Doesn't seem like shntool exists at the original link anymore, so I fixed that to point somewhere too, but couldn't tell for sure if it's definitive.

  • 1
    Of course that isn't what he's asking for ....
    – CarlF
    May 5, 2011 at 20:00
  • He was looking for something to detect cut-off (damaged, e.g. partially copied) files. Do WAV headers actually encode the file's size? I do not believe so but am willing to be corrected.
    – CarlF
    May 6, 2011 at 12:10
  • 1
    OK, +1 because when I actually followed your link (in the answer itself) it did show exactly what you say it should. My apologies.
    – CarlF
    May 6, 2011 at 17:47
  • Thanks for the answers. When I have gone through your suggestions properly, I will reply saying what worked best.
    – paradroid
    May 12, 2011 at 11:41
  • @paradroid I also submitted a feature request to the devs of shntool to add a new 'check' mode with exit status set. No response, so dunno how fruitful that'll be. May 12, 2011 at 20:43

Ripcheck is a utility that does this.

Quoting the docs:

"ripcheck" runs a variety of tests on a WAV file, to see if there are potential mistakes that occurred in converting a CD to a WAV file.



This program was written because we'd received some complaints of occasional "pops" at the beginning on some albums at Magnatune. Further research found that most of the albums we released in 2007 had various CD ripping problems. We also found various CDRs burned by our musicians that had small defects in them, probably due to cheap CDR media being used, or the CDR being burnt too quickly.


  • Could you refrain from simply providing a link. Please provide some substance to your link such as how it will answer the OP, have you used it before, what are the key features etc. Feb 28, 2014 at 8:31
  • 1
    I took the liberty of adding a quote from the docs. It looks like this tool might answer the question.
    – sleske
    Feb 28, 2014 at 8:58

I know this is an old thread, but just in case it is of any use:

The JHOVE tool (which is quite widely used in the archiving / digital libraries domain) includes a WAV module that is able to validate WAV files. Available here:


Don't know how JHOVE's validation compares to the checks that shntool performs.

UPDATE: so after posting my answer I butchered some WAVs myself and then ran them through a number of tools. Full write-up with links to test data and scripts here:


Main outcome: better stick with good old Shntool! JHOVE turns out to be useless for this kind of thing (which was a surprise to me as well). (Incidentally the blog also goes into detecting broken FLAC files, although that was not the question here.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .