MP3 to Base64
Encode MP3 audio as a playable Base64 data URI.
Drag & drop a file here, or click to browse
Drop an MP3 file here. Max 15 MB, converted in your browser.
MP3 to Base64 Converter
Convert an MP3 file into a Base64 string or a data:audio/mpeg;base64,... URI and listen to it right in the preview player. The file is processed locally in your browser, so voice recordings and unreleased tracks stay private.
About MP3
MP3 (MPEG-1/2 Audio Layer III) was developed at Fraunhofer IIS and standardized in the early 1990s. It uses a psychoacoustic model to discard sounds that human hearing masks, reaching roughly a 10:1 reduction compared to CD audio at 128 kbps. The patents expired in 2017, and MP3 is now supported by every browser, phone, game engine, and media player — it's the lowest-risk choice for embedded sound. Files are a sequence of independent frames, often preceded by an ID3 tag with metadata and album art.
Output options
- Data URI –
data:audio/mpeg;base64,SUQzBAAAAAA..., playable anywhere a URL is accepted. - Base64 only – for JSON APIs, text-to-speech responses, or databases.
- HTML tag – a complete
<audio controls src="...">element. - JSON – file name, MIME type, size, and Base64 together.
Good use cases
- Short UI sounds such as clicks, notifications, and success chimes in web apps and games.
- Offline or single-file HTML prototypes that must play audio without a server.
- Sending recorded clips to speech-to-text APIs that accept Base64 audio in a JSON body.
- Test fixtures for audio players and upload endpoints.
Keep files small
Base64 adds about 33%, and a data URI can't be streamed or cached separately, so the whole clip must load before playback. Before encoding, trim silence, convert to mono, and lower the bitrate: 64 kbps mono is plenty for speech and effects. Remove embedded cover art from the ID3 tag — a single JPEG thumbnail can be larger than the sound itself.
Need to encode WAV, OGG, FLAC, or M4A instead? Use Audio to Base64. To decode a Base64 string back into a playable file, try Base64 Encode / Decode or Base64 to Image, which also detects audio.
Frequently Asked Questions
Can I play an MP3 data URI in an audio tag?
Yes. <audio controls src="data:audio/mpeg;base64,..."></audio> works in all modern browsers, and so does new Audio('data:audio/mpeg;base64,...') in JavaScript. Choose the HTML tag output to get the ready-made element.
Is the correct MIME type audio/mpeg or audio/mp3?
The registered type is audio/mpeg. audio/mp3 is a non-standard alias that Chrome accepts but other software may not. Use audio/mpeg in data URIs and API payloads for the best compatibility.
How big can the MP3 be?
The tool accepts files up to 15 MB. In practice, inline audio should be much smaller: a 128 kbps MP3 uses about 16 KB per second, so a 3-second notification sound is roughly 48 KB of audio and 64 KB of Base64.
Why does my MP3 Base64 start with SUQz?
SUQz is the Base64 encoding of ID3, the tag block at the start of many MP3 files that holds the title, artist, and cover art. Files without tags start directly with an MPEG frame header, so the string usually begins with // (the Base64 of the FF sync byte).