.mp3 MIME type
MP3 audioaudio
audio/mpegLossy audio supported everywhere. The registered type is audio/mpeg, not audio/mp3.
| MIME type | audio/mpeg |
|---|---|
| Extensions | .mp3 |
| Also seen as | audio/mp3 |
| Content-Type | audio/mpeg |
| Compress in transit? | No — already compressed |
| File signature | 49 44 33 (ID3) when the file starts with ID3 tags; untagged files start with a frame sync such as FF FB |
Good to know
audio/mp3is non-standard; Chrome accepts it, but serveaudio/mpeg.
Serve .mp3 files with the right type
The response header to send:
Content-Type: audio/mpeg
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
audio/mpeg mp3;
AddType audio/mpeg .mp3
res.set("Content-Type", "audio/mpeg");import mimetypes
mimetypes.add_type("audio/mpeg", ".mp3")<input type="file" accept=".mp3,audio/mpeg">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.mp3 | grep -i '^content-type:' file --mime-type file.mp3
Frequently asked questions
What is the MIME type for .mp3 files?
audio/mpeg. You may also see audio/mp3, but audio/mpeg is the one to send.
What Content-Type header should a .mp3 file be served with?
Content-Type: audio/mpeg. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .mp3?
Check its bytes rather than the extension: MP3 files start with 49 44 33 (ID3) — when the file starts with ID3 tags; untagged files start with a frame sync such as FF FB. On the command line, file --mime-type name.mp3 does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options