URL Encoder/Decoder
Encode and decode URLs and URL components
Input
Output
Understanding URL Encoding
encodeURI() vs encodeURIComponent()
- encodeURI() - Encodes a complete URI, preserving special characters like :, /, ?, &, =
- Example: https://example.com/search?q=hello world
- encodeURIComponent() - Encodes all special characters, used for query parameters
- Example: hello%20world
Common Use Cases
- Encoding spaces and special characters in URLs
- Creating safe query string parameters
- Building shareable links with user data
- Debugging encoded URLs from server responses
- Preparing data for API requests
Quick Reference
Space → %20
! → %21
# → %23
$ → %24
& → %26
+ → %2B
= → %3D
? → %3F