Base64 FAQ

Usage from Address Bar

You can use direct access to this page from your browser address bar. Type string that you need to encode/decode with algorithm according to next schema:<TYPE:enc|dec>/<PHRASE> For example to visit page that contains encoded "hello world" you can just visit url: The another cool thing is that you can specify "json" or "plain" mode into URL and you will get only encoded/decoded in response.
Schema of this future:<TYPE:enc|dec>.<OUTPUT:plain|json>/<PHRASE> Example: Will output: aGVsbG8gd29ybGQ=

Usage from PHP

You can use direct access to this function in your applications.

PHP Example:

    $str = 'hello world';
    $url =''.urlencode($str);
    $base64 = file_get_contents($url);
    echo 'Base64 of "'.$str.'" is "'.$base64.'"';
Will output: Base64 of "hello world" is "aGVsbG8gd29ybGQ="

How to make the same in PHP

    $str = '¡Hola!';
    $base64EncodedStr = base64_encode($str);
    $base64DecodedStr = base64_decode($base64EncodedStr);
    echo '<pre>';
    echo $str.PHP_EOL
         .' &rarr; '.$base64EncodedStr.PHP_EOL
         .' &rarr; '.$base64DecodedStr.PHP_EOL
    echo '</pre>';

How to make the same in JavaScript

var str = 'https://localhost/?param1=¡Hola!&param2=¡Hola!';
var base64EncodedStr = btoa(str);
var base64DecodedStr = atob(base64EncodedStr);
console.log('-> ' + base64EncodedStr);
console.log('-> ' + base64DecodedStr);