Resource Interchange File Format --Audio for Windowsfile (.wav)
.wav file signature | audio/vnd.wave
Resource Interchange File Format --Audio for Windowsfile, wherexx xx xx xxis the file size (little endian)
Magic Bytes
Offset 0
52 49 46 46 2E 2E 2E 2E 57 41 56 45
Sources: Apache Tika
All Known Signatures
3 signature variants are documented for .wav files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 52 49 46 46 2E 2E 2E 2E 57 41 56 45 | 0 | Apache Tika |
| 52 49 46 46 57 41 56 45 | 0 | Wikipedia |
| 52 49 46 46 57 41 56 45 66 6D 74 20 | 0 | Gary Kessler |
Extension
.wav
MIME Type
audio/vnd.wave
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .wav files in Python
def is_wav(file_path: str) -> bool:
"""Check if file is a valid WAV by magic bytes."""
signature = bytes([0x52, 0x49, 0x46, 0x46, 0x2E, 0x2E, 0x2E, 0x2E, 0x57, 0x41, 0x56, 0x45])
with open(file_path, "rb") as f:
return f.read(12) == signature
How to validate .wav files in Node.js
function isWAV(buffer: Buffer): boolean {
const signature = Buffer.from([0x52, 0x49, 0x46, 0x46, 0x2E, 0x2E, 0x2E, 0x2E, 0x57, 0x41, 0x56, 0x45]);
return buffer.subarray(0, 12).equals(signature);
}
How to validate .wav files in Go
func IsWAV(data []byte) bool {
signature := []byte{0x52, 0x49, 0x46, 0x46, 0x2E, 0x2E, 0x2E, 0x2E, 0x57, 0x41, 0x56, 0x45}
if len(data) < 12 {
return false
}
return bytes.Equal(data[:12], signature)
}
API Endpoint
/api/v1/wav
curl https://filesignature.org/api/v1/wav
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .wav file?
A .wav file is a Resource Interchange File Format --Audio for Windowsfile file. Resource Interchange File Format --Audio for Windowsfile, wherexx xx xx xxis the file size (little endian)
What are the magic bytes for .wav files?
The magic bytes for Resource Interchange File Format --Audio for Windowsfile files are 52 49 46 46 2E 2E 2E 2E 57 41 56 45 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .wav file?
To validate a .wav file, read the first bytes of the file and compare them against the known magic bytes (52 49 46 46 2E 2E 2E 2E 57 41 56 45) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .wav files?
The primary MIME type for .wav files is audio/vnd.wave.
Is it safe to open .wav files?
Resource Interchange File Format --Audio for Windowsfile (.wav) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.