I am trying to implement a simple script on a site that will return base64 encoded information from google\'s ajax API. This is what I am playing with so far:
IE 10 & above and all latest browser
Encode String
var str = "raj"; var enc = window.btoa(str); // cmFq
Decode String
var dec = window.atoa('cmFq'); // raj
Or else you might have your own function on page. small blog with references