What is a WAV file?
WAV, short for Waveform Audio File Format, is a subset of Microsoft’s Resource Interchange File Format (RIFF) used for storing high-quality digital audio. Unlike compressed formats, WAV files store audio data without any compression, preserving full sound fidelity across various sampling rates and bitrates. This format has long been a standard for audio CDs due to its superior sound quality. Although WAV files are larger compared to modern formats like MP3, which uses lossy compression to reduce file size, WAV files can still be compressed using Audio Compression Manager (ACM) codecs. Additionally, numerous APIs and applications are available to easily convert WAV files into other popular audio formats, such as MP3, AAC, or FLAC.
Did you know? You can become a contributor at FileFormat.com to keep the file format community up to date with your findings. If you have to share anything about WAV or Audio file formats, you can post your findings in Audio File Format News section for people to remain up to date.
WAV File Format
The WAVE file format, being a subset of Microsoft’s RIFF specification, starts with a file header followed by a sequence of data chunks. A WAVE file has a single “WAVE” chunk which consists of two sub-chunks:
- a “fmt” chunk - specifies the data format
- a “data” chunk - contains the actual sample data
WAV File Header
The header of a WAV (RIFF) file is 44 bytes long and has the following format:
Positions | Sample Value | Description |
---|---|---|
1 - 4 | “RIFF” | Marks the file as a riff file. Characters are each 1 byte long. |
5 - 8 | File size (integer) | Size of the overall file - 8 bytes, in bytes (32-bit integer). Typically, you’d fill this in after creation. |
9 -12 | “WAVE” | File Type Header. For our purposes, it always equals “WAVE”. |
13-16 | “fmt " | Format chunk marker. Includes trailing null |
17-20 | 16 | Length of format data as listed above |
21-22 | 1 | Type of format (1 is PCM) - 2 byte integer |
23-24 | 2 | Number of Channels - 2 byte integer |
25-28 | 44100 | Sample Rate - 32 bit integer. Common values are 44100 (CD), 48000 (DAT). Sample Rate = Number of Samples per second, or Hertz. |
29-32 | 176400 | (Sample Rate * BitsPerSample * Channels) / 8. |
33-34 | 4 | (BitsPerSample * Channels) / 8.1 - 8 bit mono2 - 8 bit stereo/16 bit mono4 - 16 bit stereo |
35-36 | 16 | Bits per sample |
37-40 | “data” | “data” chunk header. Marks the beginning of the data section. |
41-44 | File size (data) | Size of the data section. |
Sample values are given above for a 16-bit stereo source. |