base64 decode javascript

JavaScript
var string = "Hello folks how are you doing today?";
var encodedString = btoa(string); // Base64 encode the String
var decodedString = atob(encodedString); // Base64 decode the String
var decodedString = atob(encodedString);
Source

Also in JavaScript: