Encode To 64
using System; using System.Text; public class Main { static public string EncodeTo64(string _to_encode) { byte[] toEncodeAsBytes = System.Text.UTF8Encoding.UTF8.GetBytes(_to_encode); return System.Convert.ToBase64String(toEncodeAsBytes); } }