URL Encode / Decode
Percent-encode text so it is safe inside a URL or query string, or decode encoded URLs back to readable text. Supports both component and full-URL encoding.
About this tool
URL encoding (also called percent-encoding) replaces characters that are unsafe or reserved in a URL with a % followed by their hexadecimal byte value — for example a space becomes %20 and & becomes %26. This is essential whenever you put arbitrary text into a query parameter, because characters like &, =, ? and / otherwise change the meaning of the URL.
Component vs full URL
Use component encoding (encodeURIComponent) for a single value you are dropping into a query string — it escapes &, =, / and more. Use full-URL encoding (encodeURI) when you want to keep a complete URL working — it leaves structural characters like :, / and ? intact and only escapes truly illegal characters.
When you need it
Building API request URLs, constructing search links, encoding redirect targets, and handling user input in query strings all require URL encoding to avoid broken links and injection bugs.
Frequently asked questions
It is the process of replacing reserved or unsafe characters in a URL with a percent sign followed by their hex byte value (percent-encoding), so the URL stays valid and unambiguous — for example, a space becomes %20.
encodeURIComponent escapes a single value, including structural characters like & = / ? — use it for query-string values. encodeURI escapes a whole URL but leaves those structural characters intact, so the URL remains functional.
In the path and most contexts a space is %20. In the query string of older application/x-www-form-urlencoded form submissions, spaces are encoded as +. Both decode back to a space.
No. Encoding and decoding use built-in browser functions and run entirely on your device.