A small tool for Base64 encoding end decoding.
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>
<script>
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);
}
</script>