Base64 to Audio File

Paste a Base64 string or a data:audio/…;base64,… URI and get the audio file back. The container is detected from the decoded bytes, so the result carries the right MIME type and extension — WAV, MP3, Ogg, FLAC, M4A, AAC, WebM, AIFF, AMR, WMA or MIDI. Nothing is re-encoded and nothing is uploaded: the decode runs in your browser via WebAssembly.

Try:
Audio data URL

About this tool

Audio travels through APIs, JSON payloads, databases and HTML attributes as Base64 text. This tool turns that text back into the file it came from: paste the Base64 (or the whole data:audio/…;base64,… URI), and the decoded bytes come back as a data: URL you can play, save, or paste into the address bar.

Nothing is re-encoded. The bytes that come out are byte-for-byte the bytes that were encoded — the work is the tolerant cleanup of the Base64 text plus reading the decoded file's magic header so the result gets the correct MIME type and extension.

What gets detected

With Format left on auto, the first bytes of the decoded payload decide the container:

ContainerHeader it is recognized byResult
WAVRIFFWAVEaudio/wav · .wav
MP3an ID3 tag, or a bare MPEG frame syncaudio/mpeg · .mp3
Ogg (Vorbis/Opus/FLAC)OggSaudio/ogg · .ogg
FLAC (native)fLaCaudio/flac · .flac
MP4 / M4Aftyp at offset 4audio/mp4 · .m4a
AAC (ADTS)a 0xFFF… ADTS sync wordaudio/aac · .aac
WebMthe 1A 45 DF A3 EBML markeraudio/webm · .webm
AIFF / AIFCFORMAIFFaudio/aiff · .aiff
AMR#!AMRaudio/amr · .amr
WMA / ASFthe ASF header GUIDaudio/x-ms-wma · .wma
MIDIMThd (or a RIFFRMID)audio/midi · .mid

Input the decoder forgives

Worked example

Input (truncated):

UklGRuwAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YcgAAACAob/W…

With File name beep, Format auto and strict checking on, the result is a data:audio/wav;base64,… URL. The chat and CLI surfaces return the same bytes as a real download named beep.wav; gizza tool base64-to-audio-file data=… filename=beep --out beep.wav writes the file directly.

Limits & edge cases

FAQ

Does this convert between audio formats, for example Base64 MP3 to WAV?

No. This tool only reverses the Base64 encoding — the decoded bytes are exactly what was encoded, so a Base64 MP3 comes back as an MP3. Setting Format changes the MIME type and file extension that get attached, not the audio data itself. To actually re-encode between codecs, use an audio conversion tool that runs a real encoder.

My Base64 decodes but the tool says it isn't audio. What now?

The bytes carry no header this tool recognizes. The error names what they look like instead (a PNG, a PDF, plain text, and so on), which usually means the wrong field was copied. If you know the payload really is audio but has no container header — raw AAC frames or a headerless PCM dump — set Format to that container explicitly, or turn off Reject bytes that aren't audio to save the bytes as-is.

Can I paste a whole data: URI, or must I strip the prefix first?

Paste the whole thing. A leading data:audio/mpeg;base64, (or any other media type) is stripped for you. Its declared type is only a hint: if it disagrees with the decoded bytes, the summary says so and the bytes decide the extension — that mismatch is exactly why a file saved from a data: URI sometimes ends up with the wrong suffix.

Why does my Base64 fail with "invalid Base64" when it looks fine?

Something in the payload is not a Base64 character. The error names the offending character and its position, which is usually a stray <, a %, a \n escape that stayed literal, or HTML entities from a copy out of a rendered page. Whitespace, quotes, the URL-safe -_ alphabet and missing = padding are all handled already, so anything else that trips the decoder is genuinely not part of the data.

Is my audio uploaded anywhere?

No. The page runs the decoder as WebAssembly inside your browser, and the command-line tool runs it locally. The Base64 you paste never leaves the device.

How large a payload can I decode?

Up to 32 MiB of decoded audio, which is roughly 43 MiB of Base64 text. Larger payloads are rejected with a clear message rather than silently truncated — a half-decoded audio file is worse than none.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool base64-to-audio-file "UklGRuwAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YcgAAACAob/W…"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/base64-to-audio-file/?data=UklGRuwAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YcgAAACAob%2FW%E2%80%A6&filename=audio&format=auto&strict=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.