How to decode “\\u0026” in a URL?
I want decode URL A to B : A) http:\/\/example.com\/xyz?params=id%2Cexpire\u0026abc=123 B) http://example.com/xyz?params=id,expire&abc=123 This is a sample URL and I look for a general solution not A.Replace("\/", "/")... Currently I use HttpUtility.UrlDecode(A, Encoding.UTF8) and other Encodings but cannot generate URL B ! You only need this function System.Text.RegularExpressions.Regex.Unescape(str); This is a basic example I was able to come up with: static void Sample() { var str = @"http:\/\/example.com\/xyz?params=id%2Cexpire\u0026abc=123"; str = str.Replace("\\/", "/"); str =