Uniform Resource Identifiers (URIs), standardized under IETF RFC 3986, form the structural addressing foundation of the World Wide Web. A URI operates under strict syntactical constraints: only a limited subset of US-ASCII characters may appear literally in a web address. Characters outside this permitted set—including spaces, non-ASCII Unicode glyphs, and reserved structural delimiters—must be converted into a standardized format known as Percent-Encoding (or URL Encoding). Failing to encode query parameters properly results in broken hyperlinks, truncated HTTP requests, and severe application routing bugs.
The TU Web Tools URL Encoder translates raw strings, query parameters, and complete URIs into compliant, percent-encoded strings according to RFC 3986 specifications, ensuring safe transmission across web servers, APIs, and browsers.
Reserved vs. Unreserved Characters (RFC 3986)
RFC 3986 divides the ASCII character set into three distinct categories:
| Character Category | Literal Characters | Encoding Behavior |
|---|---|---|
| Unreserved Characters | A-Z, a-z, 0-9, -, _, ., ~ |
Never encoded; transmitted literally in all contexts. |
| Reserved Characters | :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, = |
Encoded as percent-triplets (%HH) when appearing as literal data within query values. |
| Illegal Characters | Spaces, control characters, non-ASCII Unicode (e.g., emojis, accents) | Always converted to UTF-8 bytes and encoded as percent-triplets. |
The Critical Difference: encodeURI vs. encodeURIComponent
In JavaScript development, confusing encodeURI() with encodeURIComponent() is one of the most common causes of URL corruption:
- encodeURI(): Intended for complete URLs. It leaves protocol and domain delimiters (:, /, ?, &, =) intact so the overall URL remains routable.
- encodeURIComponent(): Intended strictly for query string key/value pairs. It encodes all delimiters, converting https://example.com?query=a&b into https%3A%2F%2Fexample.com%3Fquery%3Da%26b so that & and = inside values do not break query parsing.
Programmatic Implementation in Python & JavaScript
# Python standard library URL encoding
import urllib.parse
# Encoding query parameter values (RFC 3986 compliant)
param = "search & rescue=yes"
encoded = urllib.parse.quote(param, safe='')
print(f"?query={encoded}")
# Output: ?query=search%20%26%20rescue%3Dyes
// JavaScript RFC 3986 encoding function
function rfc3986Encode(str) {
return encodeURIComponent(str).replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase());
}
Zero-Knowledge Client-Side Security
Sensitive redirect URLs, OAuth callback tokens, and user credentials encoded via the TU Web Tools URL Encoder are processed entirely within your local browser tab with zero data uploaded to remote servers.