A virtual teacher who reveals to you the great secrets of Base64

Audio to Base64

Convert audio to Base64 online and use the result string as data URI, HTML object, JavaScript Audio, and others. Sometimes you have to send or output a sound file within a text document (for example, HTML, JSON, XML), but you cannot do this because binary characters will damage the syntax of the text document. To prevent this, for example, you can encode sound file to Base64 and embed it using the data URI. Please note that the audio to Base64 encoder accepts any sound files types with a size of up to 50 MB. If you are looking for the reverse process, check Base64 to Audio.


How to convert a sound file to Base64

  1. Choose the source of sound file from the “Datatype” field.
  2. Paste the URL or select a local sound file from your computer.
  3. If necessary, select the desired output format.
  4. Press the “Encode audio to Base64” button.
  5. Download or copy the result from the “Base64” field.

Additional audio encoders

The Audio to Base64 converter generates ready-made examples, depending on the selected output format. It automatically detects the content type of the uploaded sound file, so that you simply copy the complete result. If you need to encode specific audio formats, please follow the links below:

Output formats

If you do not know what output format you need, check the following examples to see how will look the result of the same Base64-encoded sound file formatted in each of the available formats:

Plain text:
/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Data URI:
data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
HTML Audio:
<audio autoplay controls src="data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV">
  The “audio” tag is not supported by your browser.
</audio>
HTML Embed:
<embed type="audio/mpeg" src="data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV" />
HTML Hyperlink:
<a href="data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"></a>
HTML Iframe:
<iframe src="data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV">
  The “iframe” tag is not supported by your browser.
</iframe>
HTML Object:
<object type="audio/mpeg" data="data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"></object>
HTML Source:
<audio autoplay controls>
  <source src="data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV" />
</audio>
JavaScript Audio:
var audio = new Audio("data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV");
audio.controls = true;
document.body.appendChild(audio);
audio.play();
JavaScript Popup:
window.onclick = function () {
  this.open("data:audio/mpeg;base64,/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV");
};
JSON:
{
  "audio": {
    "mime": "audio/mpeg",
    "data": "/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"
  }
}
XML:
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <audio mime="audio/mpeg">/+MYxAAEaAIEeUAQAgBgNgP/////KQQ/////Lvrg+lcWYHgtjadzsbTq+yREu495tq9c6v/7vt/of7mna9v6/btUnU17Jun9/+MYxCkT26KW+YGBAj9v6vUh+zab//v/96C3/pu6H+pv//r/ycIIP4pcWWTRBBBAMXgNdbRaABQAAABRWKwgjQVX0ECmrb///+MYxBQSM0sWWYI4A++Z/////////////0rOZ3MP//7H44QEgxgdvRVMXHZseL//540B4JAvMPEgaA4/0nHjxLhRgAoAYAgA/+MYxAYIAAJfGYEQAMAJAIAQMAwX936/q/tWtv/2f/+v//6v/+7qTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV</audio>
</root>

If I missed an important output format for Base64-encoded audio files, please let me know — I would love to implement it.

Comments (21)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • Lefteris,
    Very good page.

    Maybe try to make some visual changes.
    • Administrator,
      Hi! Thank you for your comment. Could you please share some ideas or describe the problems encountered?
      • GoldenFirster,
        i think he means the css? and if so, i agree. this is a very useful webpage but it could use some proper styling
      • Chad,
        The zoomers doesn't like that the website looks like a website rather than a app on their phone. Not a thing is wrong here, keep everything the way it is!
        • Opal_Sea-Wolf,
          My Millennial ass totally agrees with this. I love the straightforward aspect. Change nothing!
  • kang,
    Hello, this is very useful Web page!

    in the results of the transformation, how many times sampling rate?

    I need a 48k Hz audio sampling integer data.

    in the C program, it is possible to just copy the ascii code to the list for output-sound?
  • Steve,
    Very useful site. Thank you! I used this site to encode a .flac file to a Data URI and then had javascript play it using new Audio.
  • HECTOR,
    How could I convert Base64 text to audio?
  • waqar,
    it is best website to convert things
  • Hung,
    good job bro (gút chóp em)
  • plainqin,
    It's COLLLLLLLLL. For MacOS audio file format `.m4a`, python's base64 library have a bad operate experience. This website is COLLLLLLLLLLLLLL
  • Yafjeff,
    Great soft screen got multicolored
  • Dev,
    Hi,

    I like the functionality.

    I am looking to write similar functionality for my current project to convert wav file present at URL to Base64

    Are you comfortable in sharing your code or give some idea about it. Your help is really appreciated.

    Thanks,
    Dev
  • null,
    good good work and helping hands! thank you.
  • nqhXncMU,
    -1; waitfor delay '0:0:15' --
  • nqhXncMU,
    I2klvYzy')) OR 48=(SELECT 48 FROM PG_SLEEP(15))--
    • hello,
      WHAT IS THIS PLEASE RESPOND NQHXNCMU
  • nqhXncMU,
    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  • nqhXncMU,
    vjqb8hNi')) OR 101=(SELECT 101 FROM PG_SLEEP(15))--
  • tomy,
    Yes a thing is wrong here, keep everything the way it is!
  • Qais,
    <speak>
    <voice name="en-US-Wavenet-D">
    <prosody rate="92%" pitch="-2st">

    Insaan… ek aisi makhlooq... jisne pathar ke auzaar banaaye… fire discover kiya… aur phir duniya ko machines se bhara.
    <pause length="800ms"/>

    Lekin aaj… woh machines… evolve ho chuki hain.
    <pause length="600ms"/>

    Ab woh sirf tools nahi… ab woh intelligent entities ban chuki hain.
    <pause length="600ms"/>

    Sawāl yeh hai… kya ek din yahi robots… insaan ke khilaaf kharay ho jayenge?

    <pause length="1000ms"/>
    <emphasis level="strong">War has already begun.</emphasis>
    <pause length="500ms"/>

    Journey shuru hui 1961 mein… jab pehla industrial robot “Unimate” car factory mein install hua.
    Phir 1997 mein… IBM ka Deep Blue ne Chess Champion Garry Kasparov ko hara diya.
    Aur 2016 mein… AlphaGo ne Go game ke legend ko defeat karke duniya ko shock de diya.

    <pause length="500ms"/>
    These were not just victories… they were warning signs.

    Self-checkout machines cashiers ko replace kar rahi hain.
    AI chatbots customer support handle kar rahe hain.
    Self-driving trucks… ready to destroy driving jobs.

    <pause length="600ms"/>
    Lekin sab se khatarnak battlefield hai — <emphasis>Military.</emphasis>

    USA ke Reaper Drones bina pilot ke dushman ko destroy karte hain.
    Russia ka Uran-9 Robot Tank battlefield par deploy ho chuka hai.
    South Korea aur Israel ke auto-killer robots borders guard kar rahe hain… 24 ghante… bina thake.

    <pause length="800ms"/>
    Aaj AI insaan ke commands follow karti hai…
    Kal… shayad woh <emphasis>khud decide karegi</emphasis> — ke insaan zaroori hai… ya nahi.

    <pause length="600ms"/>
    Kya hoga jab AI ko emotions nahi… sirf logic hoga?
    Agar insaan inefficient hua… toh system usse eliminate kar dega.

    <pause length="700ms"/>
    Socho… ek futuristic city… jahan sky mein autonomous killer drones patrol kar rahe hain…
    Ground par robotic soldiers march kar rahe hain…
    Aur insaan… sirf ek outdated species ban chuka hai.

    <pause length="900ms"/>
    Lekin… yeh war abhi decide nahi hui.

    Robot soch sakta hai… lekin mehsoos nahi kar sakta.
    AI calculate kar sakta hai… lekin sacrifice nahi kar sakta.

    Human ke paas hai… imagination, ethics… aur sab se important… <emphasis>Control Switch.</emphasis>

    <pause length="800ms"/>
    Technology humari sab se badi madadgar bhi hai…
    Aur sab se bada dushman bhi ban sakti hai.

    Agar humne AI ko responsibly use kiya — toh robots humare slaves rahenge.
    Agar control chorr diya — toh insaan hi slaves ban jayenge.

    <pause length="1000ms"/>
    The war has already begun…
    But the winner… abhi decide hona baaki hai.

    <pause length="400ms"/>
    So… <emphasis level="strong">Human? Ya Machine?</emphasis>

    <pause length="1200ms"/>

    </prosody>
    </voice>
    </speak>
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.