python decode base 64 code example
Example 1: javascript base64 decode
// Define the string
var string = 'Hello World!';
// Encode the String
var encodedString = btoa(string);
console.log(encodedString); // Outputs: "SGVsbG8gV29ybGQh"
// Decode the String
var decodedString = atob(encodedString);
console.log(decodedString); // Outputs: "Hello World!"
Example 2: buffer from base64
const b64string = /* whatever */;
const buf = Buffer.from(b64string, 'base64');