MPEG-1 Audio Layer 3 (.mp3)
.mp3 file signature | audio/mpeg
MPEG-1 Audio Layer 3 (MP3) is a lossy digital audio compression format developed by the Fraunhofer Institute and standardized by ISO/IEC as part of the MPEG family. It is used for music distribution, portable audio playback, streaming, and general-purpose sound storage across computers and consumer devices. MP3 remains widely supported, though newer codecs offer better efficiency; files may also include metadata tags such as ID3 for track information.
Magic Bytes
Offset 0
49 44 33
Sources: Apache Tika, Wikipedia, Gary Kessler, Neil Harvey FileSignatures
All Known Signatures
12 signature variants are documented for .mp3 files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 49 44 33 | 0 | Apache Tika, Wikipedia, Gary Kessler, Neil Harvey FileSignatures |
| FF F2 | 0 | Apache Tika, Wikipedia |
| FF F3 | 0 | Apache Tika, Wikipedia |
| FF FB | 0 | Apache Tika, Wikipedia |
| FF F4 | 0 | Apache Tika |
| FF F5 | 0 | Apache Tika |
| FF F6 | 0 | Apache Tika |
| FF F7 | 0 | Apache Tika |
| FF FA | 0 | Apache Tika |
| FF FC | 0 | Apache Tika |
| FF FD | 0 | Apache Tika |
| FF E3 | 0 | Apache Tika |
Extension
.mp3
MIME Type
audio/mpeg
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .mp3 files in Python
def is_mp3(file_path: str) -> bool:
"""Check if file is a valid MP3 by magic bytes."""
signature = bytes([0x49, 0x44, 0x33])
with open(file_path, "rb") as f:
return f.read(3) == signature
How to validate .mp3 files in Node.js
function isMP3(buffer: Buffer): boolean {
const signature = Buffer.from([0x49, 0x44, 0x33]);
return buffer.subarray(0, 3).equals(signature);
}
How to validate .mp3 files in Go
func IsMP3(data []byte) bool {
signature := []byte{0x49, 0x44, 0x33}
if len(data) < 3 {
return false
}
return bytes.Equal(data[:3], signature)
}
API Endpoint
/api/v1/mp3
curl https://filesignature.org/api/v1/mp3
See the full API documentation for all endpoints and parameters.
Related Formats
Frequently Asked Questions
What is a .mp3 file?
A .mp3 file is a MPEG-1 Audio Layer 3 file. MPEG-1 Audio Layer 3 (MP3) is a lossy digital audio compression format developed by the Fraunhofer Institute and standardized by ISO/IEC as part of the MPEG family. It is used for music distribution, portable audio playback, streaming, and general-purpose sound storage across computers and consumer devices. MP3 remains widely supported, though newer codecs offer better efficiency; files may also include metadata tags such as ID3 for track information.
What are the magic bytes for .mp3 files?
The magic bytes for MPEG-1 Audio Layer 3 files are 49 44 33 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .mp3 file?
To validate a .mp3 file, read the first bytes of the file and compare them against the known magic bytes (49 44 33) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .mp3 files?
The primary MIME type for .mp3 files is audio/mpeg.
Is it safe to open .mp3 files?
MPEG-1 Audio Layer 3 (.mp3) 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.