URL Encoder & Decoder
Use this URL encoder and decoder to percent-encode text for use in URLs and query strings, or decode an encoded URL back to readable text. It uses the same rules as JavaScript's encodeURIComponent.
By DevCalcHub Editorial Team · Last updated:
How it works
URL encoding replaces characters that aren't safe in a URL (spaces, &, =, etc.) with a percent sign followed by their hex code, e.g. a space becomes %20.
Example
Encoding a string with spaces and a special character:
How to use the URL encoder and decoder
- Paste the text or URL component into the input box.
- Choose Encode to make it URL-safe, or Decode to make an encoded string readable.
- Copy the result.
Common URL encodings
| Character | Encoded |
|---|---|
| Space | %20 |
| & | %26 |
| = | %3D |
| ? | %3F |
| / | %2F |
| # | %23 |
| + | %2B |
| @ | %40 |
| ₹ | %E2%82%B9 |
Letters, digits and the characters - _ . ! ~ * ' ( ) are left unchanged. Non-ASCII characters such as ₹ or Hindi text are converted to UTF-8 bytes and each byte is percent-encoded.
Space as %20 or +?
In URL paths and in encodeURIComponent, a space is %20. HTML forms submitted with the application/x-www-form-urlencoded format use + for spaces instead. This tool encodes spaces as %20, and when decoding it treats + as a literal plus sign — replace + with spaces first if you are decoding form data.
Avoid double encoding
Encoding an already encoded string turns % into %25, so %20 becomes %2520. If you see %25 in your URLs, something is encoding the value twice. Encode each query parameter value exactly once, just before building the URL. To encode text into Base64 instead, use the Base64 Encoder.
Frequently asked questions
When do I need to URL-encode text?
Whenever you're putting user-provided or special-character text into a URL query parameter, so that characters like spaces, &, =, and ? don't break the URL's structure.
What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent (used here) encodes nearly all special characters, suitable for individual query parameter values. encodeURI leaves URL-structural characters like / and : untouched, suitable for encoding a whole URL.
What does %20 mean in a URL?
%20 is the URL-encoded form of a space character. The number after % is the character's byte value in hexadecimal.
Why is URL encoding needed?
URLs can only contain a limited set of characters, and some characters such as &, = and ? have special meaning. Encoding lets you include any text inside a URL without breaking its structure.
Is URL encoding the same as encryption?
No. URL encoding is fully reversible by anyone and provides no security or privacy.
Related tools
Input
Output
hello%20world%20%26%20welcome!