Skip to content

Audio Interchange File Format (AIFF) (.aif)

.aif file signature | audio/aiff

Audio Interchange File Format (AIFF) is an uncompressed audio file format developed by Apple Inc. for storing and exchanging digital sound data. It is used for music production, archiving, and playback in audio editing applications and media players, particularly on Apple platforms. AIFF is a legacy format with broad compatibility, and it is generally considered safe, though any media file should be handled carefully when obtained from untrusted sources.

Safe

Magic Bytes

Offset 0
46 4F 52 4D

Sources: Apple AIFF 1.3 Specification (IFF container)

All Known Signatures

4 signature variants are documented for .aif files across multiple sources.

Hex Signature Offset Sources
46 4F 52 4D 0 Apple AIFF 1.3 Specification (IFF container)
46 4F 52 4D 2E 2E 2E 2E 38 53 56 58 0 Apache Tika
46 4F 52 4D 00 0 Apache Tika
41 49 46 46 0 Wikipedia

Extension

.aif

MIME Type

audio/aiff, 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])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .aif files in Node.js

Node.js
function isAIF(buffer: Buffer): boolean {
  const signature = Buffer.from([0x46, 0x4F, 0x52, 0x4D]);
  return buffer.subarray(0, 4).equals(signature);
}

How to validate .aif files in Go

Go
func IsAIF(data []byte) bool {
    signature := []byte{0x46, 0x4F, 0x52, 0x4D}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .aif file?

A .aif file is a Audio Interchange File Format (AIFF) file. Audio Interchange File Format (AIFF) is an uncompressed audio file format developed by Apple Inc. for storing and exchanging digital sound data. It is used for music production, archiving, and playback in audio editing applications and media players, particularly on Apple platforms. AIFF is a legacy format with broad compatibility, and it is generally considered safe, though any media file should be handled carefully when obtained from untrusted sources.

What are the magic bytes for .aif files?

The magic bytes for Audio Interchange File Format (AIFF) files are 46 4F 52 4D at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .aif file?

To validate a .aif file, read the first bytes of the file and compare them against the known magic bytes (46 4F 52 4D) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .aif files?

The primary MIME type for .aif files is audio/aiff. Additional MIME types include: audio/aiff, audio/x-aiff.

Is it safe to open .aif files?

Audio Interchange File Format (AIFF) (.aif) 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.