How to use the URL Encoder and Decoder
- 1Choose Encode value for a single parameter, Encode full URL for a whole link, or Decode.
- 2Paste your text or URL.
- 3Copy the result.
- 4If you pasted a full URL, check the breakdown of its host, path and query parameters.
Why URLs need encoding
URLs can only contain a limited set of characters. Spaces, accented letters and symbols such as & and ? must be written as a percent sign followed by a code. A space becomes %20, and é becomes %C3%A9.
Value or full URL?
- Encode value (like JavaScript's encodeURIComponent) encodes everything that has a special meaning in URLs, including & = ? and /. Use it for a single query value, such as a search term.
- Encode full URL (like encodeURI) leaves the structure of the link alone and only encodes characters that are never allowed. Use it to fix a whole link that contains spaces.
Encoding a whole URL as a value would break it, and encoding a value as a full URL can let an & split your parameter in two, so pick the mode that matches what you have.
Decoding
Decoding turns percent codes back into readable text. A + is treated as a space, as it is in HTML form submissions. If the text contains a broken sequence, such as a % not followed by two hex digits, the tool tells you.
Characters you will meet most
| Character | Encoded | Why |
|---|---|---|
| space | %20 |
Not allowed in a URL |
& |
%26 |
Separates query parameters |
= |
%3D |
Separates a name from its value |
? |
%3F |
Starts the query string |
# |
%23 |
Starts the fragment |
/ |
%2F |
Separates path segments |
+ |
%2B |
Means a space in form data |
% |
%25 |
Starts every code |
é |
%C3%A9 |
Two bytes in UTF-8 |
RFC 3986 lists the characters that never need encoding: letters, digits, -, ., _ and ~. JavaScript's encodeURIComponent also leaves ! * ' ( ) alone, as MDN explains.
Examples
With Encode value, café & tea? becomes caf%C3%A9%20%26%20tea%3F. With Encode full URL, https://example.com/a b?q=café&x=1 becomes https://example.com/a%20b?q=caf%C3%A9&x=1, and the ?, & and = stay as they are.
Double encoding
If you see %2520, the text was encoded twice: %20 had its % encoded again to %25. Decode once to get back to %20, then once more for the text. Encode a value only once, at the moment you build the URL.
In code
encodeURIComponent("a b&c") // "a%20b%26c"
from urllib.parse import quote
quote("a b/c", safe="") # 'a%20b%2Fc'
curl -G --data-urlencode "q=café & tea" https://example.com/search
Related steps
Tokens in URLs are usually Base64URL, so see the Base64 encoder and decoder. If a parameter carries JSON, check it with the JSON formatter before encoding. Once a link is ready, the QR code generator can turn it into a scannable code.
Frequently asked questions
What does %20 mean?
%20 is the encoded form of a space. Every percent code is the byte value of a character in hexadecimal.
Should a space be %20 or +?
%20 works everywhere. A + only means a space in query strings from HTML forms. This decoder handles both.
Why did decoding fail?
A percent sign must be followed by two hexadecimal digits. Text like 100% or a cut-off sequence cannot be decoded.
Is my data sent anywhere?
No. Encoding and decoding run in your browser.
Why does my URL contain %2520?
It was encoded twice. The first pass turned a space into %20, and the second turned the % into %25. Decode it once to recover %20.
Which characters never need to be encoded?
Letters, digits and the four symbols - . _ ~ are always safe in a URL. Everything else is either reserved for a purpose or must be percent-encoded.
Last updated · By the DailyDeskTools team
Built and written with AI assistance, then tested by hand by our team. How we make our tools