Internally, UrlEncode uses the UrlEncode method to encode strings. UrlEncode is a convenient way to access the UrlEncode method at run time from an ASP.NET application. Therefore, using the UrlEncode method provides the same results as using the UrlEncode method and specifying UTF8 as the second parameter. URL encoding replaces non-ASCII characters with a '' followed by hexadecimal digits. The HttpUtility.UrlEncode method uses UTF-8 encoding by default. URL encoding converts non-ASCII characters into a format that can be transmitted over the Internet. Use the UrlPathEncode method when you encode the path portion of a URL in order to guarantee a consistent decoded URL, regardless of which platform or browser performs the decoding. The UrlPathEncode method converts each space character into the string "%20", which represents a space in hexadecimal notation.
The UrlEncode method converts each space character to a plus character (+). Keep in mind that, if you prepare URL for a connection and used the urlencode on some parameters and didn't use it on the rest of parameters, it will not be decoded automatically at the destination position if the not encoded parameters have special characters that urlencode encodes it. However, the methods return different results. You can encode a URL using with the UrlEncode method or the UrlPathEncode method. Keep in mind that, if you prepare URL for a connection and used the urlencode on some parameters and didnt use it on the rest of parameters, it will. For example, when the characters are embedded in a block of text to be transmitted in a URL, they are encoded as %3c and %3e. URL encoding replaces all character codes except for letters, numbers, and the following punctuation characters: - (minus sign) (underscore). URL encoding converts characters that are not allowed in a URL into character-entity equivalents URL decoding reverses the encoding. Decode each line separately (useful for when you have multiple entries). For encoded binaries (like images, documents, etc.) use the file upload form a little further down on this page. To encode binaries (like images, documents, etc.) use the file upload form a little further down on this page. Simply enter your data then push the decode button. Base64 Encoding of 'period' Simply enter your data then push the encode button.
If characters such as blanks and punctuation are passed in an HTTP stream without encoding, they might be misinterpreted at the receiving end. Use our super handy online tool to encode or decode your data.
The UrlEncode(String) method can be used to encode the entire URL, including query-string values.