URL Encoder
URL encode/decode special characters
Common URL Characters
About URL Encoder & Decoder
1What is it?
Encode special characters for safe use in URLs, or decode percent-encoded URLs back to readable text. URL encoding (also called percent encoding) is essential when working with query strings, form data, or any text that needs to be safely transmitted via URLs.
2Use Cases
- Build query strings with special characters
- Encode form data for POST requests
- Debug encoded URLs from APIs
- Create safe links with user-generated content
- Encode path segments with spaces or symbols
- Prepare data for GET request parameters
- Fix broken URLs with encoding issues
3Examples
Encode spaces and punctuation
Input
Hello World! How are you?
Output
Hello%20World%21%20How%20are%20you%3F
Decode percent-encoded text
Input
Hello%20World%21
Output
Hello World!
?Frequently Asked Questions
Which characters need to be URL encoded?
All characters except A-Z, a-z, 0-9, and -_.~ should be encoded in URLs. Characters like space, &, =, ?, /, #, and + have special meanings in URLs and must be encoded when used as data rather than delimiters.
Why is space encoded as %20 sometimes and + other times?
In query strings (after the ?), space can be encoded as + (for historical reasons from form submissions) or %20. In path segments and other URL parts, only %20 is valid. This tool uses %20 which works everywhere.
Should I encode the entire URL?
No! Only encode the data parts (query parameter values, path segments with special characters). Don't encode the URL structure like :// or the domain name. Encoding the whole URL will break it.
What's the difference between encodeURI and encodeURIComponent?
encodeURI preserves URL structure characters like :/?#. encodeURIComponent encodes everything except alphanumerics and -_.~. For query parameter values, always use encodeURIComponent (what this tool does).