URL encoder and decoder
Turn spaces, accents and symbols into %XX sequences so they are safe in a URL, or decode a link back to readable text. Pick whether you are encoding one value or a full address.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Choose Encode or Decode.
- Choose the scope: One value for a parameter or path segment, Whole address for a full URL.
- Paste your text. The result appears instantly; copy it.
How it works
Characters that are not allowed in a URL are written as a percent sign and the hex value of each UTF-8 byte. A space is %20, & is %26, and é (two bytes, C3 A9) is %C3%A9.
Example with the single-value mode: a b&c=d/e becomes a%20b%26c%3Dd%2Fe. With the whole-address mode, the same characters &, = and / stay as they are, because they have a job in a URL.
Common mistakes
- Encoding a whole URL with the single-value mode also escapes
: and /, giving https%3A%2F%2F…, which is not a working link.
- Encoding twice turns
%20 into %2520. If you see %25 in a link, it was probably encoded two times.
- The decoder in whole-address mode keeps escapes of reserved characters such as
%26, so the structure of the URL is not changed.
Frequently asked questions
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes everything except letters, digits and - _ . ! ~ * ' ( ), so it is right for a single query value or path segment. encodeURI also keeps the characters that structure a URL (: / ? # & = and a few more), so it is for a complete address.
Which one should I use for a query parameter?
Use the single-value mode. If a value contains & or = and you leave them as they are, they will be read as separators and break the query string.
Why does the decoder say my text is invalid?
A percent sign must be followed by two hexadecimal digits, and a group of escapes must form valid UTF-8, such as %C3%A9 for é. A lone % in text like "100%" cannot be decoded; encode it as %25.
Is a space %20 or +?
This tool uses %20, which is correct everywhere in a URL. The + form means a space only in HTML form data (application/x-www-form-urlencoded) and is not converted here.
Is my data sent anywhere?
No. The conversion runs in your browser using its built-in functions.