Skip to content

MPEG-4 Advanced Audio Coding (.aac)

.aac file signature | audio/aac

MPEG-4 Advanced Audio Coding (AAC) is a lossy audio coding format defined by the Moving Picture Experts Group and standardized by ISO/IEC as part of the MPEG-4 suite. It is used for music distribution, digital broadcasting, streaming media, mobile devices, and general-purpose audio playback. AAC files are generally safe to handle, although any media file can be used to conceal malformed data or exploit weaknesses in poorly implemented decoders.

Safe

Magic Bytes

Offset 0
FF F1

Sources: ISO/IEC 14496-3 ADTS syncword

All Known Signatures

3 signature variants are documented for .aac files across multiple sources.

Hex Signature Offset Sources
FF F1 0 ISO/IEC 14496-3 ADTS syncword
FF F9 0 ISO/IEC 14496-3 ADTS syncword
49 44 33 0 Apache Tika

Extension

.aac

MIME Type

audio/aac

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .aac files in Python

Python
def is_aac(file_path: str) -> bool:
    """Check if file is a valid AAC by magic bytes."""
    signature = bytes([0xFF, 0xF1])
    with open(file_path, "rb") as f:
        return f.read(2) == signature

How to validate .aac files in Node.js

Node.js
function isAAC(buffer: Buffer): boolean {
  const signature = Buffer.from([0xFF, 0xF1]);
  return buffer.subarray(0, 2).equals(signature);
}

How to validate .aac files in Go

Go
func IsAAC(data []byte) bool {
    signature := []byte{0xFF, 0xF1}
    if len(data) < 2 {
        return false
    }
    return bytes.Equal(data[:2], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .aac file?

A .aac file is a MPEG-4 Advanced Audio Coding file. MPEG-4 Advanced Audio Coding (AAC) is a lossy audio coding format defined by the Moving Picture Experts Group and standardized by ISO/IEC as part of the MPEG-4 suite. It is used for music distribution, digital broadcasting, streaming media, mobile devices, and general-purpose audio playback. AAC files are generally safe to handle, although any media file can be used to conceal malformed data or exploit weaknesses in poorly implemented decoders.

What are the magic bytes for .aac files?

The magic bytes for MPEG-4 Advanced Audio Coding files are FF F1 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .aac file?

To validate a .aac file, read the first bytes of the file and compare them against the known magic bytes (FF F1) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .aac files?

The primary MIME type for .aac files is audio/aac.

Is it safe to open .aac files?

MPEG-4 Advanced Audio Coding (.aac) 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.