Mode:
Real-time encoding
Input
0 chars
Copied!
0 chars
encodeURIComponent encodes all special chars including
encodeURI preserves URL structure chars β use for encoding a full URL while keeping it valid.
:/?#[]@!$&'()*+,;= β use for encoding individual query parameter values.encodeURI preserves URL structure chars β use for encoding a full URL while keeping it valid.
Parse a URL into its components
Enter a URL above to see its components
Query String Builder
Generated URL / Query String
β
Copied!
Bulk Encode / Decode
Enter one URL or string per line. All lines will be processed together.
Mode:
Input (one per line)
Copied!
0 lines
What Is URL Encoding?
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a safe format. Each unsafe character is replaced with a % followed by two hexadecimal digits representing the character’s UTF-8 byte value.
For example:
- Space becomes
%20 &becomes%26=becomes%3D
This is essential when passing data through query strings, form submissions, or API requests.
encodeURIComponent vs encodeURI
| Function | Preserves | Best For |
|---|---|---|
encodeURIComponent | Letters, digits, -_.!~*'() | Encoding individual query parameter values |
encodeURI | URL structure chars (:/?#[]@!$&'()*+,;=) | Encoding a full URL while keeping it navigable |
Common Use Cases
- API requests β Encode query parameter values before appending to a URL
- Form data β Encode user input before sending via GET requests
- Sharing URLs β Ensure URLs with special characters work across all systems
- Debugging β Decode percent-encoded URLs to make them human-readable
Related Tools
- Base64 Encoder & Decoder β Encode and decode Base64 strings, useful for binary data in URLs and APIs
- JSON Formatter & Validator β Prettify and validate JSON, commonly found in API query parameters
- Regex Tester β Test regular expressions for parsing and validating URL patterns
