Tools
Encode text so it is safe to use inside a URL, or decode a percent-encoded URL back into something readable. Choose between encoding a single query value and encoding a whole URL, and see the parts of a URL broken down.
Options
Mode
Encode as
Result
URL parts
- Protocol
- https:
- Host
- danny.engineering
- Path
- /tools
- Query
- ?q=css%20gradients%20&%20colours
- Fragment
- #top
- Param q
- css gradients
- Param colours
Frequently asked questions
- When should I use component encoding versus full URL encoding?
- Use component encoding (encodeURIComponent) for a single value you are putting into a query string or path segment: it escapes characters like ?, & and / so they do not change the URL structure. Use full URL encoding (encodeURI) when you have a complete URL and only want to escape spaces and other characters that are never valid.
- Why does a space become %20 or +?
- Percent encoding writes a space as %20. HTML forms submitted with application/x-www-form-urlencoded write it as + instead. The decoder here accepts both.
quick question
Was this tool helpful?