How to use the Base64 to Audio tool
- Paste the audio string or data:audio URL into the Base64 or Base64 data URL box.
- Select Decode file to decode the data and identify the container.
- Read the Result line: it shows the size and audio/mpeg, audio/wav, audio/mp4 or audio/ogg.
- Play the clip with the controls that appear under the result.
- Select Download to save decoded.mp3, decoded.wav, decoded.m4a or decoded.ogg.
Audio file signatures
The tool reads the header of the decoded file to select the audio player and download extension.
Detection only chooses the label and extension. The audio itself is not decoded, resampled or converted, so a 48 kHz Opus voice note stays a 48 kHz Opus voice note.
- MP3: the letters ID3 from a metadata tag, or an MPEG frame sync that starts with 0xFF. In Base64 this reads SUQz or, for a bare frame, usually begins with two slashes.
- WAV: RIFF at byte 0 and WAVE at byte 8. In Base64 this reads UklGR.
- Ogg: the capture pattern OggS from RFC 3533. In Base64 this reads T2dnUw. Both Vorbis and Opus streams use this container.
- M4A: an ISO media ftyp box with the M4A or M4B major brand.
Worked example: detecting an Ogg stream
Every Ogg page begins with the same header layout. The eight characters T2dnUwAC decode to six bytes: 4F 67 67 53 for OggS, a version byte of 0, and a header type of 2, which flags the first page of a stream. That fragment is enough for the tool to answer audio/ogg, although six bytes are far too few to play.
Input: T2dnUwAC
Bytes: 4f 67 67 53 00 02
Result: 6 bytes · audio/ogg
File: decoded.oggAudio that this decoder turns away
Other formats may contain valid audio but require a decoder that supports their container.
- Raw AAC without an M4A container.
- FLAC, whose Base64 starts with ZkxhQ.
- Audio-only WebM, which shares its header with WebM video.
- AIFF, MIDI and AMR files.
- Raw PCM samples with no header at all.
Base64 to audio in real projects
Speech synthesis and speech recognition APIs exchange audio as Base64 inside JSON. Messaging platforms deliver voice notes that way through webhooks. Browser code produces it when a MediaRecorder blob is read with FileReader.readAsDataURL. In each case the quickest way to hear what was actually sent is to decode the field and press play. Note that Chromium browsers usually record WebM, which belongs to the video decoder.
Use Base64 to MP3 or Base64 to WAV when a contract promises one specific format and you want a mismatch to raise an error. Use this page when the format is unknown or may vary between requests.
Frequently asked questions
Is the audio processed on a server?
No. Decoding, format detection and playback use your browser only. Voice recordings and call snippets that you paste remain on your device.
Which audio formats does Base64 to Audio support?
MP3, WAV, M4A and Ogg, including Ogg Vorbis and Ogg Opus. The format is read from the decoded bytes, not from the data URL label, and decides the extension of the download.
Why can I download the clip but not play it?
Playback depends on the codecs built into your browser, and on the data being complete. Some browsers cannot play every Ogg codec, and a truncated string yields a file that stops early or fails to load. The saved bytes are unaffected.
How do I decode a Base64 M4A file?
Paste the Base64 and select Decode file. An M4A-branded container is saved as decoded.m4a.
Can I paste a data URL with codec parameters?
Yes. A prefix such as data:audio/ogg;codecs=opus;base64, is recognized. Parameters between the media type and the base64 marker are skipped, and only the data after the comma is decoded.