audio/mpeg MIME Type — MP3 Audio Streaming & Content-Type Guide
MPEG-1/2 Audio Layer III (MP3). The most widely-supported lossy audio format. Despite being decades old, MP3 remains the universal baseline for audio delivery on the web and in media players.
Used For
- Podcast files
- Music streaming
- Audio players (<audio> element)
- Voice recordings
HTTP Header Example
HTTP/1.1 200 OK
Content-Type: audio/mpeg
Accept-Ranges: bytes
Cache-Control: public, max-age=3600Code Examples
// HTML audio element
<audio controls>
<source src="/song.mp3" type="audio/mpeg" />
<source src="/song.ogg" type="audio/ogg" />
</audio>
// Express — serve with range support for seek
app.get('/audio/:file', (req, res) => {
res
.set('Content-Type', 'audio/mpeg')
.set('Accept-Ranges', 'bytes')
.sendFile(req.params.file, { root: './audio' })
})Frequently Asked Questions
What is the audio/mpeg MIME type?
MPEG-1/2 Audio Layer III (MP3). The most widely-supported lossy audio format. Despite being decades old, MP3 remains the universal baseline for audio delivery on the web and in media players.
When should I set Content-Type: audio/mpeg?
Set Content-Type: audio/mpeg on HTTP responses that contain MP3 Audio data. Podcast files.
What file extensions use audio/mpeg?
Files with audio/mpeg content typically use these extensions: .mp3.
What happens if I serve this with the wrong Content-Type?
Browsers use the Content-Type header to decide how to handle the response. Serving audio/mpeg content with an incorrect MIME type can cause browsers to display it incorrectly, refuse to execute it (scripts), or prompt an unintended download. Modern browsers respect X-Content-Type-Options: nosniff and will not attempt to auto-detect the type.
