Audio to Base64 & Base64 to Audio Converter

Encode MP3, WAV, OGG, FLAC or M4A audio to Base64, or decode and play. Runs in your browser; nothing is uploaded.

Audio preview
Choose a file above or paste Base64 on the left to preview and download it here.

How to convert Audio to Base64 and Base64 to Audio

  1. Audio to Base64: drop, select, or paste an audio file (MP3, WAV, OGG, FLAC, M4A, AAC, WebM, AIFF, or MIDI up to 25 MB). Toggle between a data:audio/...;base64, Data URI for HTML <audio> tags and raw Base64 for JSON APIs.
  2. Base64 to Audio: paste raw Base64, a data:audio/...;base64, URI, or an HTML <audio src="data:..."> snippet into the Base64 pane. The audio format is detected from magic bytes, loaded into the inline player, and ready to save with Download audio.

Frequently asked questions

Which audio formats can be converted to and from Base64?
The converter detects MP3 (audio/mpeg), WAV (audio/wav), OGG Vorbis/Opus (audio/ogg), FLAC (audio/flac), M4A/AAC (audio/mp4 and audio/aac), WebM audio (audio/webm), AIFF, and MIDI directly from file magic bytes.
When should I embed audio as a Base64 Data URI?
Base64 Data URIs work well for short UI sound effects, notification chimes, and self-contained HTML demos where avoiding an extra network request outweighs the ~33% Base64 size increase.
How do I use a Base64 audio Data URI in HTML or JavaScript?
Pass the Data URI (data:audio/mpeg;base64,...) directly to <audio controls src="data:audio/..."> in HTML or to new Audio("data:audio/...").play() in JavaScript.