URL Encoder & Decoder - Free Online Tool
Encode special characters in URLs or decode percent-encoded strings with our free online tool.
| π URL Encoder | URL Decoder |
π Complete URL Encoding Guide
What is URL Encoding?
URL encoding (also called percent-encoding) converts characters that arenβt allowed in URLs into a format that can be transmitted safely. Special characters are replaced with a % followed by their hexadecimal value.
Why Do You Need URL Encoding?
URLs can only contain a limited set of ASCII characters. Characters like spaces, &, =, ?, and non-ASCII characters must be encoded.
| Character | Encoded |
|---|---|
| Space | %20 |
| & | %26 |
| = | %3D |
| ? | %3F |
| # | %23 |
encodeURIComponent vs encodeURI
// encodeURIComponent - encode everything except A-Z a-z 0-9 - _ . ! ~ * ' ( )
encodeURIComponent('hello world&foo=bar');
// "hello%20world%26foo%3Dbar"
// encodeURI - preserves URL structure characters
encodeURI('https://example.com/path?q=hello world');
// "https://example.com/path?q=hello%20world"
Common Use Cases
- Query parameters - Passing user input in URLs
- Form submissions -
application/x-www-form-urlencodedformat - API requests - Encoding special characters in endpoints
- Redirect URLs - Encoding callback URLs
Try It Now
Use our free URL encoding tool - secure, fast, and runs entirely in your browser.
| π Encode URL | Decode URL |