Base-64 encoding is a way of taking binary data and turning it into text so that it's more easily transmitted in things like e-mail and HTML form data. In technical terms Base64 encoding transforms any input into an encoding that only uses alphanumeric characters, +, / and the = as a padding character.
$str = 'This is an normal string'; echo base64_encode($str);
var str = 'This is an normal string'; console.log(btoa(str));
var str = 'This is an normal string'; var bytes = System.Text.Encoding.UTF8.GetBytes(str); var result = return System.Convert.ToBase64String(bytes);
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.