AIF

audio/x-aiff

Safe

Magic Bytes

Offset: 0
46 4F 52 4D 2E 2E 2E 2E 41 49 46 46

Audio Interchange File Format (AIFF) is a lossless audio standard developed by Apple Inc. for storing uncompressed pulse-code modulation data. It is primarily utilized in professional audio production, mastering, and studio recording environments where bit-for-bit signal accuracy is required. As a static container for raw audio data, the format is considered inherently safe, although it has largely been superseded by more efficient compressed formats for general consumer distribution and mobile playback.

Extension

.aif

MIME Type

audio/x-aiff

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .aif files in Python

Python
def is_aif(file_path: str) -> bool:
    """Check if file is a valid AIF by magic bytes."""
    signature = bytes([0x46, 0x4F, 0x52, 0x4D, 0x2E, 0x2E, 0x2E, 0x2E, 0x41, 0x49, 0x46, 0x46])
    with open(file_path, "rb") as f:
        return f.read(12) == signature

How to validate .aif files in Node.js

Node.js
function isAIF(buffer: Buffer): boolean {
  const signature = Buffer.from([0x46, 0x4F, 0x52, 0x4D, 0x2E, 0x2E, 0x2E, 0x2E, 0x41, 0x49, 0x46, 0x46]);
  return buffer.subarray(0, 12).equals(signature);
}
Go
func IsAIF(data []byte) bool {
    signature := []byte{0x46, 0x4F, 0x52, 0x4D, 0x2E, 0x2E, 0x2E, 0x2E, 0x41, 0x49, 0x46, 0x46}
    if len(data) < 12 {
        return false
    }
    return bytes.Equal(data[:12], signature)
}

API Endpoint

GET /api/v1/aif
curl https://filesignature.org/api/v1/aif

Related Formats