Guide: URL encode and decode (percent-encoding)
When to use it
When you build a link with parameters that contain spaces, accents or symbols, or when you want to read a URL full of %20 and %C3%A1.
Tips
- For a single value (a parameter) use “encodeURIComponent”: it also encodes / ? & and =.
- For a whole address use “encodeURI”: it leaves : / ? & = and # intact.
- In classic forms a space is written as +; there is an option for that.
- If decoding fails, there is probably a stray % or a cut-off sequence.
Frequently asked questions
What is %20?
It is the space. The number after the % is the character’s code in hexadecimal.
Can I decode a full URL?
Yes, paste it and choose Decode: you will see the readable text.