How to play Base64 audio
- Paste the Base64 or a
data:audio/…;base64,URI into Base64 or data URI. Long strings can be loaded with Open .txt file. A short two-note WAV sample is loaded when the page opens. - The player appears below the file info. Duration shows the length once the browser has read the header, for example
0:03.0. - File name, Extension and MIME type are filled in from the detected format. Change them if needed.
- Press Download file to save the audio, or Copy as data URI to get a string for an
<audio src>.
The sound is decoded and played inside your browser. The page’s Content Security Policy blocks every network request except Cloudflare’s page-view count, so a recording cannot be sent anywhere from here.
Which formats play in the browser
The player is your browser’s own <audio> element, so playback depends on its built-in decoders. Current versions handle most formats:
| Format | Base64 starts with | Chrome, Edge, Firefox | Safari |
|---|---|---|---|
| MP3 | SUQz (with ID3 tag), //s, //M | Yes | Yes |
| WAV with PCM samples | UklGR | Yes | Yes |
| AAC in M4A | AAAAHGZ0eXBNNEEg and similar | Yes | Yes |
| FLAC | ZkxhQw | Yes | Yes |
| Ogg Vorbis | T2dnUw | Yes | From Safari 18.4 |
| Opus in Ogg or WebM | T2dnUw, GkXfo | Yes | Partly, depending on version and container |
| AMR (old phone recordings) | IyFBTVIK | No | No |
| WAV with ADPCM or GSM | UklGR | Usually not | Usually not |
WAV is a container with a codec field, so two .wav files can behave differently. Chrome, for example, also plays µ-law and A-law telephony WAVs, but not ADPCM. When the browser cannot decode a file, Duration shows n/a and a note appears above the player: “Your browser can’t play this AMR file. Download it and open it in a media player.” VLC and ffmpeg handle all of the formats above.
Audio inside a video container
Audio does not always arrive in an audio format. Browser recordings made with MediaRecorder in Chrome are WebM with Opus inside by default, and some services wrap AAC in an MP4 file without the M4A brand. The tool then reports “This looks like WebM, not audio.” or “This looks like MP4, not audio.” with a download button for that extension, and the player still works: the dimensions row says audio only. Saving it as .webm or .mp4 is correct; most audio players open those files too.
If the tool detects plain Binary but you know the codec, type its MIME type into MIME type, for example audio/ogg. The preview is rebuilt with an audio player for that type, which is a quick way to test a guess.
Raw audio without a header
Some speech and voice APIs return raw samples, often 16-bit PCM at 16 or 24 kHz, with no WAV header around them. Those bytes have no signature, so the tool reports “This doesn’t look like audio (detected: Binary)” and nothing can play them. The fix is to add a header with the right sample rate, which the API documentation states; Base64 to WAV shows how in a few lines of Python.
Where Base64 audio comes from
Text-to-speech APIs return the synthesized speech as a Base64 field in JSON. Chat and messaging exports store voice notes the same way. Web apps keep short sounds as data:audio/… URIs in their code or CSS, and audio from a browser recording often travels to a server as Base64 in a JSON request. To go the other way, from a sound file to a string, use Audio to Base64.
Check the codec on the command line
When a file refuses to play, ffprobe names the codec inside:
base64 -d clip.b64 > clip.bin
ffprobe -v error -show_entries stream=codec_name,sample_rate,channels -of csv=p=0 clip.bin
For a telephony recording it prints something like adpcm_ima_wav,8000,1, which explains why the browser gave up. Converting it to plain PCM makes it playable everywhere: ffmpeg -i clip.bin -c:a pcm_s16le clip.wav. More shell recipes are on Base64 in Bash, and format details on Base64 to MP3.
FAQ
How do I play a Base64 audio string?
Paste it into the box above and press play in the player that appears. Plain Base64 and data:audio/…;base64, URIs both work; the tool picks the format from the bytes.
Why won't my Base64 audio play?
Either the browser has no decoder for the codec inside (AMR, ADPCM or GSM WAV files, for example), or the data is raw samples without a file header. The note under the player tells you which case you have; see the table and the section on raw audio below.
What is the right MIME type for Base64 audio?
It depends on the format: audio/mpeg for MP3, audio/wav for WAV, audio/ogg for Ogg Vorbis and Opus, audio/mp4 for M4A, audio/flac for FLAC. After decoding, the MIME type field shows the one that fits the detected format.
How do I find the duration of Base64 audio?
Decode it here: the Duration row shows minutes and seconds as soon as the browser has read the file’s metadata. In code, decode to a file and run ffprobe -show_entries format=duration on it.