Free Online URL Encoder & Decoder
Encode and decode URLs and query strings. Learn the difference between encodeURI and encodeURIComponent.
Input
Output
How to use
- Paste a URL or query string into the input editor.
- Choose encodeURI for whole URLs, orencodeURIComponent for individual query values.
- Click Convert and copy or download the result.
Example input
https://example.com/search?q=developer tools &lang=en
URL Encoder/Decoder FAQ
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves characters that give a URL its structure, such as :, /, ? and #, so it is used for whole URLs. encodeURIComponent encodes those characters too, which is what you want for a single query-string value.
Are spaces encoded as plus signs?
No. This tool uses percent-encoding, so a space becomes %20. The plus sign convention belongs to application/x-www-form-urlencoded form submissions, not to encodeURI or encodeURIComponent.
What happens if I decode malformed input?
Invalid percent sequences such as a lone % are reported as an error instead of being silently dropped, so you can see exactly what is wrong.