DevToolsmith

WAV MIME Type

audio/wav is the MIME type for WAV audio. Here is the Content-Type header to send, the file signature, and how to configure servers and code.

MIME type
audio/wav
Extensions
.wav
Content-Type header
audio/wav
Registered
No, a common convention
Compress with gzip
Yes, it is text or uncompressed
Category
Audio

About WAV audio files

Usually uncompressed PCM, so about 10 MB per minute of CD-quality stereo. Browsers play it, but for the web, compress it to MP3, AAC or Opus. Older software sends audio/x-wav or audio/wave.

Other types seen for these files: audio/x-wav , audio/wave , audio/vnd.wave . Accept them when reading uploads, but send audio/wav yourself.

File signature

WAV files start with "RIFF", then "WAVE" at byte 8. The extension and the type a browser reports for an upload both come from the file name, so check these bytes on the server before trusting a file.

Serve .wav with the right Content-Type

Response header
Content-Type: audio/wav
nginx (a line in the types { } block of mime.types)
audio/wav wav;
Apache (.htaccess or server config)
AddType audio/wav .wav
Caddy
@wav path *.wav
header @wav Content-Type "audio/wav"
Check what a server sends
curl -sI https://example.com/file.wav | grep -i '^content-type'
# Content-Type: audio/wav

Set the type in code

Node.js (Express)
res.set('Content-Type', 'audio/wav');
// Or make the browser download it:
res.attachment('file.wav');
Python
import mimetypes

mimetypes.add_type('audio/wav', '.wav')  # if your system doesn't know it
mimetypes.guess_type('file.wav')[0]  # 'audio/wav'
Go
mime.AddExtensionType(".wav", "audio/wav")
w.Header().Set("Content-Type", "audio/wav")

Accept .wav uploads

HTML
<input type="file" accept=".wav,audio/wav">

The accept attribute only filters the file picker; users can still choose another file. Listing the extension as well as the type matters, because operating systems don’t always report the type you expect.

Related types

  • .mp3 (audio/mpeg): MP3 audio
  • .flac (audio/flac): FLAC audio
  • .ogg (audio/ogg): Ogg audio

More audio

.m4a , .aac . Look up any extension or type with the MIME type lookup.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What is the MIME type for .wav files?

audio/wav. You may also see audio/x-wav, audio/wave, audio/vnd.wave, which are older or unofficial; send audio/wav. The full header is "Content-Type: audio/wav".

Why does my server send the wrong Content-Type for .wav?

Web servers pick the type from the file extension using a table (mime.types in nginx and Apache). If .wav is missing from that table, they send a default such as application/octet-stream or text/plain. Add the mapping as shown on this page, then check the response with "curl -sI".

How can I check that a file really is WAV?

Look at the first bytes rather than the extension or the type the browser reports, which both come from the file name. WAV files start with "RIFF", then "WAVE" at byte 8. The MIME type lookup on this site reads them for you when you drop a file on it.