What is the URL Encoder/Decoder?
The URL Encoder/Decoder converts text to and from percent-encoding, the format used to put spaces and special characters safely into URLs. It supports both encodeURIComponent rules (for query values) and encodeURI rules (for complete URLs), plus form-style + for spaces.
When the decoded text is a full URL, its query parameters are listed in a table.
Why use it?
Unescaped characters such as &, = and # break query strings, and non-ASCII characters must be encoded as UTF-8. Decoding is equally useful for reading tracking links and redirect URLs.
How to use the URL Encoder/Decoder
- Choose Encode or Decode.
- When encoding, choose the rules: component for a single value, full URL to keep the URL structure.
- Paste your text and copy the result.
- Tick the + option if you are working with HTML form data.
Examples
Search query parameter
café & croissants encodes as caf%C3%A9%20%26%20croissants, so the & is not mistaken for a parameter separator.
Reading a redirect link
Decode https%3A%2F%2Fexample.com%2Fpage%3Fid%3D5 to see the destination https://example.com/page?id=5.
Supported formats and inputs
- UTF-8 text input.
- Percent-encoded input (%XX sequences).
Limitations to know about
- Malformed sequences such as %E0%A4 without the final byte cannot be decoded; the tool explains the error.
- This tool does not punycode-encode international domain names.
Privacy
Everything is processed by JavaScript running in your browser tab. Your input is not sent to a server, logged or stored, so it is safe to use with configuration files and internal data. As always, avoid pasting production secrets into any website you do not control.
Frequently asked questions
encodeURI or encodeURIComponent?
Use component rules for any single piece you insert into a URL (a parameter value, a path segment). Use full-URL rules only for a complete URL that already has its structure.
Should spaces be %20 or +?
%20 is correct everywhere. + means space only in application/x-www-form-urlencoded data, such as HTML form submissions.
Why are some characters not encoded?
Letters, digits and a few symbols (- _ . ! ~ * ' ( )) are safe in URLs and are left unchanged by the standard encoding rules.
What happens if I encode text twice?
The % signs are encoded again as %25, producing values like %2520. If you see that in a URL, it was double-encoded; decode it twice to recover the original.