URL Encoder / Decoder
Percent-encode or decode URLs and query strings — instant and private.
How to use
- Paste a URL or text.
- Choose Encode or Decode.
- Copy the result.
How the URL Encoder / Decoder works
Percent-encodes and decodes URL components so that spaces, ampersands and non-ASCII characters survive being placed in a query string.
Unsafe characters are replaced with a percent sign and their hexadecimal byte values in UTF-8. Decoding reverses the substitution.
space → %20 · & → %26 · / → %2F · ? → %3F · = → %3D
Worked example
hello world&more encodes to hello%20world%26more, so the ampersand is not read as a parameter separator.
Things worth knowing
- Encode the component, not the whole URL. Encoding an entire address escapes the :// and breaks it.
- The + character means a space only in form-encoded bodies, not in the path. This inconsistency causes a lot of bugs.
- Non-ASCII characters are encoded as their UTF-8 bytes, so one character can become several percent-escapes.
Frequently asked questions
When do I need URL encoding?
Whenever a URL contains spaces or special characters, percent-encoding keeps it valid in links and query strings.
Encode the whole URL or just a value?
Encode individual query values; encoding a full URL would also escape the slashes and colons.
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves characters with structural meaning like : / ? &, so it suits a whole URL. encodeURIComponent escapes them, which is what you want for a single value.