Base64 encoding and decoding tool

A small tool for Base64 encoding end decoding.

The tool

This tool uses the two functions atob and btoa.


Here the small JavaScript and unstyled HTML code behind it.

<textarea id="decoded"></textarea>
<button onclick="encodeString();">encode</button>
<textarea id="encoded"></textarea>
<button onclick="decodeString();">decode</button>
var decoded = document.getElementById("decoded");
var encoded = document.getElementById("encoded");
function encodeString() {
    encoded.value = window.btoa(decoded.value);
function decodeString() {
    decoded.value = window.atob(encoded.value);
Next Previous