What is URL Encoder/Decoder?
A URL Encoder/Decoder is a free online tool that converts special characters in URLs to a format that can be safely transmitted over the internet. URLs can only contain a limited set of characters (ASCII letters, digits, and some special characters). All other characters must be converted to a percent-encoded format.
For example, a space character is encoded as %20, making it safe to include in URLs, query parameters, and API requests.
Why Use URL Encoder/Decoder?
- Safe URL Transmission — Encode special characters for safe URL transmission
- API Development — Properly encode query parameters for web APIs
- Form Handling — Encode form data submitted via GET requests
- SEO-Friendly URLs — Ensure URL parameters are properly encoded
- Cross-Platform Compatibility — Works across all browsers and systems
Common URL Encodings
| Character | Encoded | Description |
|---|---|---|
| Space | %20 | Space between words |
| ! | %21 | Exclamation mark |
| # | %23 | Hash/Pound sign |
| % | %25 | Percent sign |
| & | %26 | Ampersand |
| = | %3D | Equals sign |
| / | %2F | Forward slash |
| : | %3A | Colon |
| ? | %3F | Question mark |
| @ | %40 | At symbol |
| + | %2B | Plus sign |
URL Encoding Examples
Before Encoding
https://example.com/search?q=hello world&lang=en
After Encoding
https://example.com/search?q=hello%20world&lang=en
How to Use URL Encoder/Decoder
- Enter your URL or text in the input field above
- Click "Encode" to convert to percent-encoding
- Click "Decode" to convert back to readable text
- Click "Copy Result" to copy the output
Use Cases
Query Parameters
When building search URLs with user input, always URL encode the parameters to handle special characters safely.
API Requests
Most web APIs require URL-encoded parameters. Use this tool to encode your API keys, tokens, and request data.
SEO and Sharing
Properly encoded URLs work correctly when shared via email, social media, or messaging apps.
EncodeURI vs EncodeURIComponent
In JavaScript, there are two main encoding functions:
encodeURI()— Encodes special characters but leaves these unencoded:A-Z a-z 0-9 ; , / ? : @ & = + $ - _ . ! ~ * ' ( ) #encodeURIComponent()— Encodes everything except ASCII letters and digits. Use this for individual parameter values.
Frequently Asked Questions
What's the difference between URL encoding and HTML encoding?
URL encoding (percent-encoding) uses %XX format for special characters, while HTML encoding uses entity names like &. Use URL encoding for URLs and query parameters, HTML encoding for displaying text in HTML.
Can I decode URL-encoded strings?
Yes! Use the "Decode" button to convert percent-encoded strings back to their original format.
Is URL encoding case-sensitive?
Yes. %3A is encoded correctly, but %3a may not be recognized by all systems. Always use uppercase for percent-encoded characters.
Do spaces need encoding?
Yes! Spaces cannot appear in URLs. They should be encoded as %20 or + (depending on context).