Base64 Decode Base64 Encode CSS Beautifier Url Encoder Url Decoder Image to Base64 Base64 to Image

C# System.Convert.ToBase64String()

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.


public static string ToBase64String( byte[] inArray )


inArray - An array of 8-bit unsigned integers.

Return value

The string representation, in base 64, of the contents of inArray.

string base64Decoded = "base64 encoded string";
string base64Encoded;
byte[] data = System.Text.ASCIIEncoding.ASCII.GetBytes(base64Decoded);
base64Encoded = System.Convert.ToBase64String(data);

See also:
C# FromBase64String