URL Encoder / Decoder
Turn text into URL-safe percent-encoding, or pull an encoded URL back into readable text — with both component mode (for query values) and full-URL mode.
Why URLs Need Encoding at All
A URL can only safely contain a limited set of characters. Spaces, ampersands, question marks, non-English letters and most symbols have jobs inside a URL's structure — or no place in it at all — so they are rewritten as percent-escapes: a % followed by two hex digits of the character's UTF-8 bytes. A space becomes %20, an ampersand %26, and "ü" becomes %C3%BC. Browsers do this silently in many places, which is why you only notice encoding when it breaks: a link with a raw & in a title splits your query parameters, and a % in text gets misread as the start of an escape.
Component Mode vs Full-URL Mode
The distinction that matters: component mode (JavaScript's encodeURIComponent) escapes everything structural, including / ? & and =, because the text is destined to sit inside a URL as one value — a search term, a redirect target, a filename. Full-URL mode (encodeURI) keeps those structural characters intact and only escapes what can never appear, like spaces and non-English letters, because the text is a URL whose structure must survive. Picking the wrong one is the classic bug: component-encoding a whole URL destroys it, and full-URL-encoding a query value leaks its & and = into the surrounding URL.
Decoding, and Its One Trap
Decoding reverses the escapes back to characters. The trap is double-encoding: text that was encoded twice decodes once into still-encoded text (%2520 becomes %20, not a space). If a decoded result still contains %XX sequences, run it through once more — the Swap button here makes that a two-click job. Malformed escapes (a % not followed by two hex digits) make strict decoders throw; the error line will tell you when that happens instead of handing back mangled text.
Frequently Asked Questions
What is the difference between Encode and Encode Component?
Component mode escapes structural characters (&, =, ?, /) because the text will sit inside a URL as a single value. Full-URL mode keeps the structure and only escapes characters that can never appear, like spaces.
Why did my decoded text still contain %20 sequences?
It was probably encoded twice. One decode turns %2520 into %20; a second turns it into a space. Use the Swap button to feed the output back in and decode again.
Is a space %20 or + in a URL?
Both exist. %20 is the standard percent-encoding everywhere in a URL; the + for space is a legacy convention from form submissions, valid only in query strings. This tool produces %20.
Why did decoding show an error?
A % that is not followed by two hex digits (or a truncated multi-byte sequence) is malformed, and strict decoding refuses it rather than guessing. The error line names the problem.