How to use the URL Encoder
- Choose encode or decode.
- Select component or full URL mode.
- Paste the text and copy the result.
Formula
%20 for a space; encodeURIComponent also escapes / : ? & = +
Worked examples
a b&c
a%20b%26c
a%20b%26c
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps URL structure characters such as / and ?; encodeURIComponent escapes them.
Why is a space sometimes written as +?
That is form encoding for application/x-www-form-urlencoded data, common in HTML forms.
Does decoding ever fail?
Yes, if the string contains a stray % or an invalid byte sequence; the tool reports the error.