Developer tool
URL encode and decode
Make text safe to put in a web address, turn %20-style codes back into readable text, and see every part of a URL.
Advertisement
Result
Advertisement
Break down a URL
Query parameters
Why URLs need encoding
Web addresses can only contain certain characters. Spaces, Hindi letters, &, ? and many symbols have to be written as a % followed by two hex digits. For example, a space becomes %20 and ₹ becomes %E2%82%B9.
- A value (encodeURIComponent) is for one part, such as a search term or a parameter value. It also encodes / ? & = so they can't break the URL.
- A whole URL (encodeURI) keeps the characters that give a URL its structure, and encodes only the rest.
Advertisement