Base64 Encoding Example in PHP

    $str = 'This is an normal string';
    echo base64_encode($str);

Base64 Encoding Example in Javascript

    var str = 'This is an normal string';

Base64 Encoding Example in C#

    var str = 'This is an normal string';
    var bytes = System.Text.Encoding.UTF8.GetBytes(str);
    var result = return System.Convert.ToBase64String(bytes);

How Base64 Encode Online?

You can easily encode string to Base64 format using this online tool. To encode just enter string into the textbox provided and press encode button.


You can also check similar Base64 Decode tool.