Skip to content

Adaptive Multi-Rate ACELP (.amr)

.amr file signature | audio/amr

Adaptive Multi-Rate ACELP (Algebraic Code Excited Linear Prediction)Codec, commonly audio format with GSM cell phones. (SeeRFC 4867.)

Safe

Magic Bytes

Offset 0
23 21 41 4D 52

Sources: Apache Tika, Wikipedia, Gary Kessler, Neil Harvey FileSignatures

All Known Signatures

2 signature variants are documented for .amr files across multiple sources.

Hex Signature Offset Sources
23 21 41 4D 52 0 Apache Tika, Wikipedia, Gary Kessler, Neil Harvey FileSignatures
23 21 41 4D 52 0A 0 Apache Tika

Extension

.amr

MIME Type

audio/amr

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .amr files in Python

Python
def is_amr(file_path: str) -> bool:
    """Check if file is a valid AMR by magic bytes."""
    signature = bytes([0x23, 0x21, 0x41, 0x4D, 0x52])
    with open(file_path, "rb") as f:
        return f.read(5) == signature

How to validate .amr files in Node.js

Node.js
function isAMR(buffer: Buffer): boolean {
  const signature = Buffer.from([0x23, 0x21, 0x41, 0x4D, 0x52]);
  return buffer.subarray(0, 5).equals(signature);
}

How to validate .amr files in Go

Go
func IsAMR(data []byte) bool {
    signature := []byte{0x23, 0x21, 0x41, 0x4D, 0x52}
    if len(data) < 5 {
        return false
    }
    return bytes.Equal(data[:5], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .amr file?

A .amr file is a Adaptive Multi-Rate ACELP file. Adaptive Multi-Rate ACELP (Algebraic Code Excited Linear Prediction)Codec, commonly audio format with GSM cell phones. (SeeRFC 4867.)

What are the magic bytes for .amr files?

The magic bytes for Adaptive Multi-Rate ACELP files are 23 21 41 4D 52 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .amr file?

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

What is the MIME type for .amr files?

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

Is it safe to open .amr files?

Adaptive Multi-Rate ACELP (.amr) 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.