URL encode and decode
About URL Encode / Decode
URL encode text to percent-encoding or decode it back, following RFC 3986. Characters that would break a URL, like spaces, ampersands, slashes and non-ASCII letters, become %XX sequences.
Use it to build query strings, decode a redirect target, or fix a double-encoded URL from a log. Component mode encodes a single value. Full URL mode keeps the address structure intact.
Runs in your browser. Nothing is uploaded.
How it works
Component vs full URL encoding
Component mode uses encodeURIComponent and escapes every reserved character, including /, ?, &, = and :. Use it for one value inside a query string. Full URL mode uses encodeURI and keeps those structural characters, so a whole URL still works. Encoding a full URL in component mode is the classic mistake that breaks links.
How percent-encoding works
Each unsafe character is converted to UTF-8 bytes, and each byte becomes % plus two hex digits. A space becomes %20, & becomes %26, / becomes %2F, a colon becomes %3A, and é becomes %C3%A9. Decoding reverses this.
Decoding and the + sign
Decode mode resolves %XX sequences and also reads + as a space. Browsers use + for spaces in form-encoded query strings (application/x-www-form-urlencoded), and this is the most common source of confusion in real URLs.
Malformed input is caught
A % that is not followed by two hex digits is invalid. The decoder reports it instead of producing wrong text, so truncated input is easy to spot.
Frequently asked questions
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes everything, including /, ?, & and =, so it suits single query-string values. encodeURI keeps those characters so a whole URL stays valid. Use Component mode for values and Full URL mode for complete addresses.
Should a space be encoded as %20 or +?
Both are common. %20 is the RFC 3986 percent-encoding and works anywhere in a URL, and that is what encode mode outputs. + means a space only in form-encoded query strings. Decode mode accepts both.
Why does my decoded URL show + instead of spaces?
Browsers encode spaces as + in form-submitted query strings. Decode mode converts + to a space, which matches what servers receive.
What does %20 mean?
It is a percent-encoded space: % followed by the byte value in hex. Other common ones are %26 for &, %3F for ?, %2F for / and %3A for a colon. Multi-byte UTF-8 characters become several %XX sequences.
My URL was encoded twice. Can I fix it?
Yes. A sign of double encoding is %2520, which is an encoded %20. Decode once to remove the outer layer, then again to get the original text.
Is the URL I paste sent anywhere?
No. Encoding and decoding run in your browser, so URLs with tokens or personal data stay on your machine.
Learn more
Sources & last verified
We checked this tool's behavior and the claims on this page against the specifications below on . The tool runs in your browser, so the output you see is exactly what the engine produced.
Found a wrong result or an outdated claim? Report an error and we will check it again.