UrlEncode
URL encoding, or percent-encoding, is a mechanism for representing characters within a URL that might otherwise be misinterpreted or unavailable in a URL. It converts such characters into a percent sign followed by two hexadecimal digits that represent the character’s byte value in UTF-8. The scheme is defined by RFC 3986 and applies to the path, query, and fragment components of a URL. Unreserved characters (A–Z, a–z, 0–9, hyphen, underscore, period, tilde) are left as-is; reserved characters (such as : / ? # [ ] @ ! $ & ' ( ) * + , ; =) are encoded when they would be interpreted as syntax rather than data.
Representations of data in URLs use two common forms. In canonical percent-encoding, spaces become %20, and the
Common tools exist across languages. Python's urllib.parse.quote and quote_plus, JavaScript's encodeURI and encodeURIComponent, Java's java.net.URLEncoder. When