Published
April 14, 2024
Updated
It's important to compress audio files for optimal user experience. Very long audios such as podcasts should be streamed.
Ideally, target a size not much larger than you'd generate images, to optimize browser download time.
Audio Formats
What audio formats do you need?
Historically, browsers typically support MP3 or OGG- however all modern browsers now support MP3, so it's the most important format to use.
Conclusion
- MP3 is sufficient for modern browsers.
- You only need
.ogg
if you're targeting very old Linux Firefox versions or are trying to avoid proprietary formats entirely. - In practical terms today,
.mp3
alone is fine for most projects.
https://caniuse.com/mp3
Browser Notes
Firefox does support MP3 now — on all major platforms (Windows, macOS, Linux, Android). The reason .ogg
was historically included was:
- In the past, Firefox on Linux lacked MP3 support due to licensing issues.
.ogg
is royalty-free and supported by Firefox since the beginning.
FAQs
Answers to frequently asked questions.