devkult_
tools29converters34
home/mime/.mp3

.mp3 MIME type

MP3 audioaudio

audio/mpeg

Lossy audio supported everywhere. The registered type is audio/mpeg, not audio/mp3.

MIME typeaudio/mpeg
Extensions.mp3
Also seen asaudio/mp3
Content-Typeaudio/mpeg
Compress in transit?No — already compressed
File signature49 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/mp3 is non-standard; Chrome accepts it, but serve audio/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:

nginx (inside the types block in mime.types)
audio/mpeg mp3;
Apache (.htaccess or server config)
AddType audio/mpeg .mp3
Express
res.set("Content-Type", "audio/mpeg");
Python
import mimetypes

mimetypes.add_type("audio/mpeg", ".mp3")
HTML file input
<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.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options