Developer
URL Encoder & Decoder
Fix a link that has spaces or odd characters, or read an encoded one. Pick the right method for a whole link or just one part.
Parameters in this link
| Name | Value (decoded) |
|---|
Your text stays on your device. The tool uses your browser’s own functions and never opens or visits the link you paste.
How to use it
- Choose Encode or Decode.
- For encoding, pick whether you have a single value or a whole link.
- Paste your text, then copy the result. If you paste a full link, its parameters are listed below.
Why links need encoding
A web address can only contain a limited set of characters. A space, an ampersand or a letter like é has to be written as a percent sign and two hex digits. For example, a space is %20 and é is %C3%A9, because é takes two bytes in UTF-8.
Whole link or one part?
- One part (encodeURIComponent) escapes everything special, including
/ ? & = #. Use it for a single value that goes inside a link, such as a search term. - A whole link (encodeURI) leaves those characters alone so the link still works. Use it on a complete address that has a space or an accent in it.
Using the whole-link method on a single value is the most common mistake: an & in the value is left as it is and splits your parameter in two.
Spaces: %20 or +
In the path of a link a space is %20. In an HTML form, a space is traditionally written as +. Both are understood in a query string, but only %20 works everywhere, so it is the default here. The form option is for data that follows the older form style.
Tested, not guessed
Every number below comes from running this tool, not from a guess.
Example
This text, encoded as one part of a link:
cats & dogs/été
Becomes: cats%20%26%20dogs%2F%C3%A9t%C3%A9
The whole-link method keeps the structure of an address: https://example.com/a b?q=été becomes https://example.com/a%20b?q=%C3%A9t%C3%A9
Decoding 100% gives this message: There is a % that is not followed by two hex digits (like %20).
Limits
- Uses the browser functions encodeURIComponent, encodeURI and decodeURIComponent. A lone half of an emoji cannot be encoded.
Frequently asked questions
What does decoding do to a plus sign?
By default a + stays a +, because in a path it is a real plus. Tick the box to read it as a space, which is right for form data.
Why do I get a malformed error?
A % must be followed by two hex digits. A stray % in the text, or a link cut off in the middle of a character, causes this.
Does it visit the link?
No. It only changes the text.
Is my text uploaded?
No. Everything runs in your browser.