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 (34)

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
    • LinusTorvalds,
      Dear administrator, I hope you are doing well.
      However, Look, we have Base64 in the kernel because the real world is messy and sometimes you have to talk to broken protocols that expect text. But it's compartmentalized. If I catch you trying to pass Base64-encoded strings around the core virtual memory management or the filesystem layer, I will personally throw your patch in the trash.Using Base64 to store binary data in a system that actually needs to process it is brain-damaged. You are actively choosing to waste a third of your memory bandwidth and CPU cache turning perfectly fine binary into ASCII bloat just because you're too lazy to handle a raw byte stream.Base64.guru? Give me a break. Calling someone a 'guru' because they know how to navigate a website that turns compact data into bloated text is the absolute pinnacle of modern engineering delusion. It's not a tool for gurus; it's a glorified calculator for people who are terrified of raw bytes.The site boasts about making it easy to embed images directly into HTML or CSS as Base64 strings. That isn't 'clever' or 'optimized' web design—it’s a crime against network bandwidth. You are voluntarily taking a dense binary image, blowing up its file size by a third, and then forcing a user's CPU to waste clock cycles parsing text blocks just because you were too lazy to set up a proper asset pipeline.The internet is already drowning in bloated, sluggish JavaScript frameworks, and websites like this just encourage developers to pile on more inefficient, uncacheable text strings.If you need a web app to help you shuffle 6-bit safe characters around because you don't understand how bit-shifting works in your own terminal, you aren't a guru. You're a script kiddie. Close the browser, write a native script, and learn how to handle a raw data stream properly. saw someone sharing 'Base64.guru' as if it’s some masterclass tool for advanced developers. Let's be completely honest: the only thing 'bleeding' here is the network efficiency of any system built by the people using it.The creator of that site isn't a guru; they’ve built a monument to bad practices. By encouraging developers to copy-paste massive blocks of text into codebases to avoid dealing with real files, they are actively making the software ecosystem lazier and slower.You aren't clever because you wrote a JavaScript form that pushes binary data into a 64-character alphabet array. A toddler can do that with a basic lookup table. If you want to actually impress someone, write a hyper-optimized binary parser that minimizes cache misses instead of building a web page that glorifies a 33% data bloat penalty.Using that site to design a backend architecture is a public admission that you don't know how memory blocks work. Stop bleeding CPU cycles on text decoding, close the browser tab, and learn how to write real software.Your website is a public monument to bad practices. You have built a playground that encourages clueless developers to copy-paste massive blocks of text into their code to avoid learning how a real file system works. You are actively training an entire generation of engineers to celebrate data bloat and waste CPU clock cycles on useless text decoding. Shut down the server, delete the domain, and go learn how to write a real binary parser before you pollute the software ecosystem any further.Your tool is a double-sided failure.On one side, you are actively coddling lazy developers. Instead of teaching them how to handle a proper binary byte stream, you give them a big shiny button to instantly bloat their code by 33% with text wrappers. You make it easy for them to be incompetent.But what’s even worse is that you’ve wrapped this incredibly basic concept in opaque, confusing tech jargon that completely alienates normal people. A regular person looks at your site and thinks Base64 is some mystical, complex cryptographic wizardry. It isn’t. It’s a glorified 6-bit alphabet lookup table from the 1980s.By making it look like a 'guru' skill, you intimidate non-technical users while simultaneously giving lazy programmers a pass to write awful, slow code. You’ve managed to create something that is intimidating to the public, useless to real engineers, and actively harmful to internet bandwidth. That takes a special kind of bad design.

      my sincerest regards,
      Linus Torvalds
  • 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,
    I2klvYzy')) OR 48=(SELECT 48 FROM PG_SLEEP(15))--
    • hello,
      WHAT IS THIS PLEASE RESPOND NQHXNCMU
  • tomy,
    Yes a thing is wrong here, keep everything the way it is!
  • Weishuyuan,
    我是一个正在开发送给爸爸的父亲节游戏的中国大学生!谢谢你创造了这个网页,它很简洁好用
    • AdomBarrett,
      At first I had never heard of this and now I’m lik3 “well.. this better be worth it”
  • JOGAF3L1PEGAMER,
    OK, I tried, and this. Is WONDERFUL!!!!
  • RonL,
    Change nothing. Boomer here. This is very easy to read and get good ideas for my own pages.
  • wUmrLVWz,
    555*if(now()=sysdate(),sleep(15),0)
  • wUmrLVWz,
    5550"XOR(555*if(now()=sysdate(),sleep(15),0))XOR"Z
  • wUmrLVWz,
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • wUmrLVWz,
    555-1; waitfor delay '0:0:15' --
  • wUmrLVWz,
    555-1); waitfor delay '0:0:15' --
  • wUmrLVWz,
    555LNgFQ6to'; waitfor delay '0:0:15' --
  • wUmrLVWz,
    555*if(now()=sysdate(),sleep(15),0)
  • wUmrLVWz,
    555*if(now()=sysdate(),sleep(15),0)
  • wUmrLVWz,
    5550'XOR(555*if(now()=sysdate(),sleep(15),0))XOR'Z
  • wUmrLVWz,
    5550"XOR(555*if(now()=sysdate(),sleep(15),0))XOR"Z
  • wUmrLVWz,
    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  • wUmrLVWz,
    555-1; waitfor delay '0:0:15' --
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.