# .mp3 MIME Type: audio/mpeg

> Lossy 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 header: `audio/mpeg`
- Compress in transit: no (already compressed)
- File signature: `49 44 33` (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`.

## Server configuration

### 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">
```

## FAQ

### 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

- [.m4a — audio/mp4](https://www.devkult.com/mime/m4a.md)
- [.ogg — audio/ogg](https://www.devkult.com/mime/ogg.md)
- [.wav — audio/wav](https://www.devkult.com/mime/wav.md)
- [.flac — audio/flac](https://www.devkult.com/mime/flac.md)

Open the interactive page: https://www.devkult.com/mime/mp3