URL Encoder & Decoder
Runs entirely in your browser
Percent-encode text so it's safe inside a URL or query string, or decode percent-encoded text back to its original form — directly in your browser.
Off encodes a single value with encodeURIComponent. On also escapes URL-structural characters with encodeURI-style full encoding — use this only when encoding an entire URL isn't your goal.
What is URL Encoder & Decoder?
URL encoding (percent-encoding) replaces characters that aren't safe inside a URL — spaces, &, =, ? and others — with a % followed by their hex code, so arbitrary text can travel safely as part of a URL or query string. Decoding reverses that, turning percent-encoded sequences back into the original characters.
How to use URL Encoder & Decoder
- Paste your text or percent-encoded text into the Input box.
- Click Encode to percent-encode it, or Decode to convert it back.
- Copy the result from the Output box.
Features
- Encode text to percent-encoding and decode it back, in one tool.
- Encodes query-parameter values safely with
encodeURIComponent, with an optional full-encoding mode for reserved URL characters. - Clear error message when decoding invalid percent-encoding.
- 100% client-side — your text never leaves your browser.
Example
This text:
Save 20% (limited)!
encodes to this, with the checkbox off (plain encodeURIComponent):
Save%2020%25%20(limited)!
and to this, with "encode reserved characters too" checked:
Save%2020%25%20%28limited%29%21
Decoding either result returns the original text.
Tips
encodeURIComponent— used when the checkbox is off — deliberately leaves! ' ( ) *unescaped, since they're legal inside a URI component; check the box if you need those escaped too, for example for strict RFC 3986 compliance.- Spaces become
%20, not+, in both directions — the plus-for-space convention belongs to HTML form encoding (application/x-www-form-urlencoded), which this tool doesn't use. - Encode only the value of a query parameter, not the whole URL — running a full URL through this tool would also escape
:,/and?, breaking the URL's structure. - Pasting text with no
%sequences into Decode is harmless — it comes back unchanged, since there's nothing to decode.
Is URL Encoder & Decoder safe?
Yes. Encoding and decoding both run entirely in your browser using JavaScript's built-in encodeURIComponent and decodeURIComponent — including catching a malformed sequence like a lone % before it would otherwise throw — so nothing you type or paste is ever sent to a server.
Frequently Asked Questions
What does URL encoding do?
It replaces characters that aren't safe inside a URL — spaces, &, =, ? and others — with a percent sign followed by their hex code, so the value can travel safely inside a URL or query string. Decoding reverses the process.
Should I encode a whole URL or just part of it?
Encode individual query parameter values, not an entire URL — encoding a full URL would also escape characters like : and / that need to stay intact for it to work.
Does this handle + as a space?
No. Plus-as-space is a convention specific to form encoding (application/x-www-form-urlencoded), not standard percent-encoding, so + is left as-is in both directions.
What happens if the input isn't valid percent-encoding?
Decoding shows a clear error message instead of a page crash or garbled output — fix the input and click Decode again.
What's the difference between this and Base64 encoding?
URL encoding (percent-encoding) makes text safe inside URLs; Base64 encoding makes arbitrary binary data safe inside plain text. They solve different problems and aren't interchangeable.