URL Encode / Decode
Percent-encode or decode URLs and query parameters — component-safe and full-URI modes.
Loading URL Encode / Decode… If nothing happens, please enable JavaScript.
Frequently asked questions
Is my data uploaded to a server?
What characters are considered 'safe' and left unencoded?
What is the difference between the two modes?
Why does a space sometimes become + and sometimes %20?
Are there characters that can never appear in a URL even when encoded?
Does this tool handle Unicode and emoji correctly?
Can I use this to decode a URL that was double-encoded?
Is URL encoding the same as HTML entity encoding?
What is the difference between a URI and a URL?
Why does encoding an already-encoded string produce garbled output?
About URL Encode / Decode
Percent-encoding, commonly called URL encoding, is the mechanism defined in RFC 3986 for safely representing arbitrary characters inside a Uniform Resource Identifier. The internet's addressing system was designed around ASCII, so any character outside a small safe set — spaces, accented letters, punctuation, emoji, or raw binary — must be replaced by a percent sign followed by two hexadecimal digits representing the character's byte value in UTF-8. The scheme has been part of the web since Tim Berners-Lee defined URLs at CERN in 1990 and was formally standardised in RFC 1738, later superseded by RFC 3986 in 2005.
URL encoding is unavoidable whenever you build or parse web addresses programmatically. Query string values that contain spaces, ampersands, or equal signs would break parameter parsing if left unencoded. Form submissions default to application/x-www-form-urlencoded, which percent-encodes everything and converts spaces to +. REST API clients must encode path segments that contain slashes or question marks so the server does not interpret them as structural characters. Webhook payloads, OAuth redirect URIs, and deeplinks all rely on careful encoding and decoding to pass data without ambiguity.
This tool handles percent-encoding and decoding entirely in your browser. It offers two modes to match the two standard JavaScript functions. Component mode (equivalent to encodeURIComponent) is intended for individual values — a search term, a filename, an OAuth parameter — and escapes everything except the unreserved characters A–Z, a–z, 0–9, hyphen, underscore, period, and tilde. Full-URI mode (equivalent to encodeURI) preserves the structural characters of a complete URL — colon, slash, question mark, hash, ampersand, equals — and is useful when you want to normalise a URL without breaking its structure. Because everything runs locally, no input is ever sent to a server.
A common mistake is to encode an entire URL with encodeURIComponent: this escapes the colons and slashes, producing a broken address. Use component mode only on individual values before assembling them into a URL. Conversely, forgetting to encode values that contain & or = inside query strings leads to parameters being silently split or merged on the receiving end. Also note that the + character means a space only inside application/x-www-form-urlencoded bodies; in path segments, a literal + should be percent-encoded as %2B.
How percent-encoding got its name
Percent-encoding takes its name from the literal percent sign (%) used as its escape character. When Tim Berners-Lee defined the URL syntax at CERN in 1990, he needed a way to represent arbitrary bytes that would be unambiguous in ASCII text. He chose % because it was printable, rarely used in identifiers, and visually distinct — making encoded sequences easy to spot at a glance.
The original URL specification (RFC 1738, 1994) already required percent-encoding for unsafe characters, but different systems disagreed on which characters were 'unsafe' and how to handle Unicode. It took until 2005 — and RFC 3986 — for a definitive standard to emerge, along with a companion document (RFC 3987) defining IRIs (Internationalized Resource Identifiers), which allow Unicode characters directly in the syntax.
Today, virtually every programming language ships a URL-encoding function in its standard library, yet subtle differences remain: PHP's urlencode() encodes spaces as +, Python's urllib.parse.quote() uses %20, and JavaScript's encodeURIComponent() follows RFC 3986. This diversity is why cross-language API integrations sometimes struggle with encoding mismatches — the same character can look completely different depending on which library serialised it.