Basic Base 64 encoded javascript code example
Example 1: javascript encode base64
const encoded = window.btoa('Alireza Dezfoolian'); // encode a string
const decoded = window.atob(encoded); // decode the string
Example 2: javascript base64 decode
var decodedString = atob(encodedString);