What Is This?
The audio/mpeg MIME type indicates that the content is an MP3 audio file using MPEG Audio Layer III compression. MP3 is the most widely supported audio format on the web, compatible with all browsers and devices. It uses lossy compression to significantly reduce file size while maintaining acceptable audio quality.
Common Uses
Common Use
Music streaming and podcast distribution
Common Use
Audio playback in web pages
Common Use
Downloadable audio content
Common Use
Sound effects and audio clips
Examples
Serve files with the audio/mpeg MIME type:
# Nginx
location ~ \.mp3$ {
add_header Content-Type "audio/mpeg";
}
# Apache
AddType audio/mpeg .mp3Use this MIME type in HTML or HTTP:
Content-Type: audio/mpeg <!-- HTML reference --> <link rel="preload" href="file.mp3" as="fetch" crossorigin>
Frequently Asked Questions
Is MP3 still the best choice for web audio?
For maximum compatibility, yes. However, AAC (audio/mp4) and Ogg Vorbis (audio/ogg) offer better quality at the same bitrate. Use MP3 when broad compatibility is needed and AAC/Ogg for better quality.
What bitrate should I use for web MP3?
128 kbps is acceptable for speech, 192 kbps is good for music, and 256-320 kbps is recommended for high-quality audio. Balance file size against quality based on your use case.