# WAV Audio File Inspector

> Reads the header of a WAV file in your browser and reports the sample rate, bit depth, channel count, encoding and exact length, along with every RIFF chunk the file contains and what each one is for. The file is never uploaded.

Use it: https://tessalor.com/en/audio/audio-file-inspector

This tool runs entirely in the browser. Nothing entered into it is uploaded.

## How it is done

1. Read the first twelve bytes and check that they say RIFF (or RIFX, or RF64) followed by a size and then WAVE. Anything else is a different format, and the message names what it appears to be instead.
2. Walk the chunk list from byte twelve. Each chunk is four ASCII bytes of identifier, a 32-bit length, and that many bytes of payload, padded with one unused byte when the length is odd.
3. Clamp every declared length to the bytes actually present and always advance at least eight bytes, so a file with a corrupt chunk table produces an answer rather than a hang or a crash.
4. Read the fmt chunk for the format tag, the channel count, the sample rate, the byte rate, the block alignment and the bits per sample.
5. When the format tag is WAVE_FORMAT_EXTENSIBLE, read the real tag from the first bytes of the sub-format GUID twenty-four bytes further in, and the count of valid bits from the extension.
6. Decide how many bytes of audio there are — the size the data chunk declares, unless it is zero or larger than the file, in which case use the bytes actually present.
7. Divide the audio by the block alignment to get sample frames for a fixed-width format, or take the frame count from the fact chunk for a compressed one, then divide the frames by the sample rate to get the length in seconds.
8. Write the figures out, and offer the whole header including the chunk map as a JSON download. Nothing is uploaded at any point.

## Assumptions

- A WAV file does not store its duration anywhere. The length shown is worked out from the size of the audio and the rate the header claims, which is exactly what a player does, so a file with a wrong sample rate in its header reports a wrong length here and plays at the wrong speed everywhere.
- For a fixed-width format the frame count is the audio size divided by the block alignment, rounded down. A trailing partial frame is discarded, because a fraction of a frame cannot be played.
- Bit depth is the container width the header declares, not the number of bits carrying signal. Audio recorded at 24 bits and packed into 32-bit words reports 32, and the encoding line says how many of those bits are valid.
- A compressed format packs a varying number of frames into each block, so its length comes from the fact chunk. Without one, the byte rate is an average and the length is an estimate rather than an exact figure.
- Only the header is read and the audio is never decoded. A file whose header is correct and whose samples are silence, noise or corruption looks perfectly healthy here.
- When the declared audio size is sound it is used, and the length is exact. When it is zero or larger than the file, the fallback counts every byte from the audio to the end of the file, which over-reports by the size of any metadata sitting behind the audio. That is the safer error: the alternative under-reports an interrupted recording by all of its audio.
- The whole file is read into this tab even though only the first few hundred bytes are needed, which is why it is capped at 256 MB. Nothing is sent anywhere.

## Inputs

| Name | Label | Type | Default | Range |
| --- | --- | --- | --- | --- |
| `source` | WAV file | file | chosen on your device | audio/wav, audio/x-wav, audio/wave, audio/vnd.wave, audio/*, up to 256 MB |
| `dataSize` | Where the length comes from | select | auto |  |

## Outputs

- `sampleRate` — Sample rate (Hz) (integer), primary
- `bitDepth` — Bit depth (bits per sample) (integer)
- `channels` — Channels (integer)
- `encoding` — Encoding (text)
- `length` — Length (text)
- `lengthSeconds` — Length (seconds) (number)
- `bitRate` — Bit rate (kbps) (integer)
- `frames` — Sample frames (integer)
- `audioBytes` — Audio data (bytes) (integer)
- `chunks` — Chunks in the file (integer)

## Questions

### Is my audio file uploaded anywhere?

No. The file is read in this browser tab and parsed by a worker running on your own machine. There is no server to send it to, and the automated test for this page fails if any request leaves this site while a file is loaded.

### Why does this say 32-bit when my recorder says 24-bit?

Because those are two different numbers and the file carries both. A 24-bit sample does not fit a whole number of bytes comfortably, so many recorders and editors write it into a 32-bit container and set the valid bit count to 24. The bit depth shown is the container; the encoding line says how many bits are actually carrying signal.

### Why is the length a fraction of a second different from my player?

Most likely because the data chunk declares a size that does not match the bytes present. A recording interrupted by a flat battery or a full card often leaves the declared size at zero or stops short of it, and different software resolves that differently. Under "More options" you can see both figures by switching between the size the header declares and every byte to the end of the file.

### It says this is not a WAV file, but the name ends in .wav

The extension is a label, not a guarantee, and plenty of software writes an MP3 or an AIFF and calls it .wav. The check here is on the bytes at the front of the file, and the message names what the file appears to be instead — an MP3, an Ogg, a FLAC, an AIFF or an MP4 container.

### What are all these extra chunks?

A WAV file is a list of chunks and only two of them are required. Everything else is metadata a recorder or an editor added — bext for broadcast timecode, iXML for production notes, LIST for artist and comment tags, cue and smpl for markers and loop points, and JUNK or FLLR as padding left so a later edit can grow the header without rewriting the file.

### Can it tell me whether the recording is any good?

No. It reads the header and never decodes a sample, so it can tell you a file claims to be 96 kHz stereo but not whether there is anything above 20 kHz in it, and not whether the take is clipped, silent or corrupt.

## Sources

- [RFC 2361: WAVE and AVI Codec Registries](https://www.rfc-editor.org/info/rfc2361/) — IETF, applies to 1998. Retrieved 2026-07-30.
- [Wave File Specifications](https://www.mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html) — MMSP Lab, Department of Electrical and Computer Engineering, McGill University, applies to 2022. Retrieved 2026-07-30.
- [WAVEFORMATEXTENSIBLE structure (mmreg.h)](https://learn.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible) — Microsoft, applies to 2023. Retrieved 2026-07-30.
- [EBU Tech 3306: RF64, An Extended File Format for Audio](https://tech.ebu.ch/publications/tech3306) — European Broadcasting Union. Retrieved 2026-07-30.

---

Estimate, not advice. See https://tessalor.com/en/disclaimer.
Machine-readable catalogue: https://tessalor.com/api/tools.json
