About the URL Encoder
Percent-encode text to put it safely in a URL, or decode a long encoded link back into something readable. Choose whether you are encoding a single value (which escapes / ? & =) or a whole URL (which keeps them), and whether spaces become + as in HTML forms. Paste a URL with a query string to see its parameters as a table.
How to use it
- Choose Encode or Decode.
- Paste the text or URL.
- Copy the result, or read the parameters table.
Example
- Input
- name=Ada Lovelace&city=London
- Result
- name%3DAda%20Lovelace%26city%3DLondon
Questions
encodeURIComponent or encodeURI?
Use component mode for a single query value or path segment: it escapes every reserved character. Use whole-URL mode when you have a complete address and only want to fix spaces and non-ASCII characters.
Should a space be + or %20?
%20 is correct everywhere. + means space only in query strings sent by HTML forms (application/x-www-form-urlencoded).
Why does decoding fail?
A % must be followed by two hex digits, and the bytes must form valid UTF-8. The error message shows the broken sequence.