URLs in SharePoint are often filled with “%20” in place of blanks, and other substitutions. However there are times when the original clean URL is desired. The “%20” references are known as “encoded” URls. URL encoding replaces unsafe ASCII characters with a “%” followed by two hexadecimal digits.
URLs can only be sent over the Internet using the ASCII character set. However for emailing or auditing URLs, sometimes the decoded URL is desired.
Here’s how to Encode and Decode an URL in PowerShell:
$EncodedURL = [System.Web.HttpUtility]::UrlEncode($URL) $DecodedURL = [System.Web.HttpUtility]::UrlDecode($URL)
Industry standard encoding is described in detail in: http://www.w3schools.com/tags/ref_urlencode.asp