using System.Collections.Generic;
using Microsoft.AspNetCore.WebUtilities;
static void Main(string[] args)
var original = "MThLHciL42HhaGrdhbVWue8p6+Npj/J4hVe0/NAwiO4=";
var newValue = Uri.EscapeDataString(original);
var bytes = Convert.FromBase64String(original);
var encoded = WebEncoders.Base64UrlEncode(bytes);
var decode1 = WebEncoders.Base64UrlDecode(encoded);
var decode2 = WebEncoders.Base64UrlDecode(original);
Console.WriteLine(Convert.ToBase64String(decode1));
Console.WriteLine(Convert.ToBase64String(decode2));
Console.WriteLine(newValue);
Console.WriteLine(encoded);