Decode Base64 - Free Online Base64 decoder

How to use Base64 decoder tool?

Three simple steps:

  1. Type or paste your base64 text data that needs to be decoded to the first input.

  2. Click on "Decode Base64" button.

  3. Decoded data (original text or binary) will appear in the second input.

  4. Please use "Paste example" button at the top of the page to quicky see the tool in action.

Base64 Decoding: What it is and Why it is important

Base64 decoding is a process of converting data that encoded with base64 algorithm (ASCII text) back to original content. For example: PNG image is encoded with base64 and then sent to the server via REST API in JSON format. Server received that JSON and we want to save it and see the original picture. To do it, we must take that base64 text, pass it to base64 decoder, and save the result as a file with .png extension. That's it, now we can open a file to see the original image. It's important to keep in mind that base64 encoded string can contain any type of data, and we need to know its MIME type in advance to be able decode it properly and save as a file with correct extension.

Another example: Base64 encoding sometimes can be used as a super simple option to hide some text information to make it unreadable. To be able to read it, we need to decode it with base64 decoder. Base64 online decoder can be used for that, or it can be decoded with a help of some programming language.

How to decode base64 with JavaScript?

If you want to use browser JavaScript for it, it can be done by calling the "atob()" function. The function accepts a single argument (base64 text) and returns a string. Good!

Ok, I decoded my data. How to encode it with base64 again?

If you would like to encode base64 data with JavaScript in the browser, you can open console in developer tools and use "btoa()" function. The function accepts a single argument (original data) and returns encoded data as ASCII string. Simple!

If you wish to do it online, try base64 encoder tool.