Uniform Resource Identifiers and RFC 3986 Standards
URL encoding, officially known as percent-encoding, is a standard mechanism defined in RFC 3986 to translate characters within a Uniform Resource Identifier (URI). Web communication protocols rely on structured text addresses to locate resources across the internet. However, URIs are restricted to a narrow subset of ASCII characters. Characters outside of this allowed subset (including symbols, punctuation, and non-ASCII characters such as emojis or non-Latin alphabets) must be encoded to prevent web servers and browsers from misinterpreting them.
The encoding process converts unsafe characters into their corresponding byte values and represents them as a percent sign (%) followed by two hexadecimal digits. For instance, a space character (ASCII 32) is encoded as %20, a question mark (ASCII 63) is encoded as %3F, and an ampersand (ASCII 38) becomes %26. This translation ensures that URIs remain structurally intact as they traverse different network routers, load balancers, and application gateways.
Under RFC 3986, characters are classified into two main sets: reserved and unreserved. Understanding the clear boundaries between these two groups is critical for designing robust web applications, query parsers, and API integrations.