URL Encode / Decode
Percent-encode text for a URL path or query string, with strict component mode and spaces-as-plus options, or decode a percent-encoded string back to plain text. Malformed escapes are reported instead of silently mis-decoded. Runs entirely in your browser.
About this tool
Percent-encoding replaces characters that have special meaning in URLs with %xx escapes so they survive a round trip. This tool encodes in component mode (everything except letters, digits and a handful of punctuation — right for a single query-string value) or full-URI mode, which keeps structural characters like ://, ? and = intact. Decoding turns escapes back into text and reports malformed input — a lone % or a truncated UTF-8 sequence — instead of silently mis-decoding it.
When to use it
Questions
Component mode or full-URI mode?
Component mode (the default) encodes every reserved character, which is what you want for a single value inside a query string. Full-URI mode keeps the structure characters of a complete URL, so the result is still a working link.
Spaces as %20 or +?
Both decode to a space here. %20 is what RFC 3986 defines and is the safe default; + is a form-submission convention from HTML. If you encode with +, literal plus signs in your text are encoded as %2B, so nothing is lost.
Why does my string fail to decode?
Most often a lone % that does not start a valid escape, or a truncated sequence like %E6 that cuts a multi-byte UTF-8 character in half. The tool reports the problem rather than guessing, because best-effort decoding quietly corrupts text.
What does percent-encoding actually do?
It rewrites characters a URL cannot carry safely as a % followed by the character's hexadecimal bytes: a space becomes %20, and é becomes %C3%A9 because that is its two-byte UTF-8 encoding. Decode reverses the process. The classic failure is encoding too little — a raw & inside a query value ends the parameter early, so the second half arrives as a separate parameter.
Which characters survive each mode?
Component mode leaves only letters, digits and - _ . ! ~ * ' ( ) untouched, so it is safe for a value inside a query string. Full-URI mode additionally keeps the structural characters of a complete URL — : / ? # [ ] @ and a few others — which is why it is right when you are encoding a whole link rather than one value.
Why did my plus signs turn into spaces?
Decoding here treats + as a space, the convention for form and query-string data. A plus sign that must survive as a plus is written %2B — that decodes to a literal +, while a bare + becomes a space. If a decoded string shows a space where you expected +, whatever produced it encoded with %20 skipped or the plus was never escaped.
Why is my URL broken after encoding?
A complete URL was encoded in component mode. Component mode escapes the structural characters too — : becomes %3A, / becomes %2F — so the result is a safe value, not a working link. That is correct when you are embedding a URL inside another URL's query string, wrong when you just wanted the link tidied. Switch to full-URI mode for whole links; keep component mode for the values inside them.