Use "URL Component" for query parameters, "Full URI" for complete URLs
Encoded Result
Quick Examples
About URL Encoding
URL encoding (also called percent encoding) converts characters into a format that can be transmitted over the Internet. URLs can only contain certain characters from the ASCII character set.
Why URL Encoding?
URLs can only be sent over the Internet using the ASCII character set. Characters outside this set must be encoded, as well as certain ASCII characters that have special meaning in URLs.
Characters That Need Encoding:
- Reserved characters: : / ? # [ ] @ ! $ & ' ( ) * + , ; =
- Unsafe characters: Space " < > % { } | \ ^ ~
- Non-ASCII characters: Unicode and special characters
Encoding Methods:
encodeURIComponent()
Encodes everything except: A-Z a-z 0-9 - _ . ! ~ * ' ( )
Use for: Query parameters, form data, individual URI components
encodeURI()
Encodes everything except: A-Z a-z 0-9 ; , / ? : @ & = + $ - _ . ! ~ * ' ( ) #
Use for: Complete URLs (preserves URL structure)
Common Examples:
| Character | Encoded As | Description |
|---|---|---|
| Space | %20 | Space character |
| ! | %21 | Exclamation mark |
| @ | %40 | At symbol |
| # | %23 | Hash/pound |
| $ | %24 | Dollar sign |
| % | %25 | Percent |
| & | %26 | Ampersand |
Use Cases:
- Building search URLs with query parameters
- Passing data in URL parameters
- Creating shareable links with encoded data
- Working with APIs that accept URL-encoded data
- Handling user input in URLs safely