Free URL Encoder Decoder Online - Percent Encoding Tool
68 usesCommon URL Encoding Reference
| Character | Encoded | Description |
|---|---|---|
| Space | %20 / + | Most common URL escape character |
| ! | %21 | Exclamation mark |
| # | %23 | Hash, URL anchor symbol |
| % | %25 | Percent sign (must be escaped) |
| & | %26 | URL parameter separator |
| = | %3D | URL parameter assignment |
| ? | %3F | Query string start |
| / | %2F | Path separator |
URL Encoding Facts
What is URL Encoding?
URL encoding converts special characters to %XX format, ensuring URLs transmit safely across the web without being misinterpreted.
Unicode in URLs
Non-ASCII characters (accented letters, CJK, emoji) are converted to UTF-8 bytes then percent-encoded, e.g. ä becomes %C3%A4.
encodeURIComponent
Encodes all special characters including : / ? # — ideal for URL parameter values.
encodeURI
Preserves URL structure characters (://?#@) — use this for encoding a complete URL while keeping its structure intact.
URL-Safe Characters
Letters A-Z, a-z, digits 0-9, and -_.~ are URL-safe and never need encoding.
Space Encoding
Spaces can be encoded as %20 or + in URLs. %20 is standard for paths; + is used in form submissions. Modern practice prefers %20.
Frequently Asked Questions
Why do special characters need URL encoding?
The URL specification only allows ASCII characters. Special characters, spaces, and non-English letters must be encoded to transmit correctly and avoid breaking URL structure.
What is the difference between %20 and + for spaces?
%20 is the RFC 3986 standard encoding for spaces in URL paths. + is used in application/x-www-form-urlencoded format (form submissions). Modern best practice uses %20.
What happens if I encode an already-encoded URL?
You get double encoding — %20 becomes %2520. This causes errors when decoding. Always check if content is already encoded before encoding again.
What does URI malformed error mean?
This error occurs when trying to decode an invalid percent-encoded string — for example, % followed by non-hexadecimal characters or incomplete sequences.
Do I need to manually encode URL parameters in JavaScript?
Modern APIs like fetch and axios handle encoding automatically. But when manually building URL strings, always use encodeURIComponent for parameter values.
How do I correctly encode UTM tracking parameters for social media campaigns?
Social media platforms require URLs to be properly encoded to ensure tracking parameters (like utm_source, utm_medium, utm_campaign) are transmitted correctly. Use `encodeURIComponent` for each parameter's *value* (e.g., `utm_campaign=My Campaign & Product`) to prevent spaces, ampersands, or other special characters from breaking the URL or misinterpreting your tracking data. This tool helps ensure your UTMs are always valid for accurate analytics.
How do I correctly encode multilingual text or special characters like umlauts and Kanji for a URL?
When creating URLs with non-ASCII characters, such as German umlauts (ä, ö, ü), French accents (é, ç), or Japanese Kanji, proper URL encoding is essential. This tool converts these characters into their percent-encoded form, like `%C3%A4` for 'ä'. This prevents display errors ("mojibake"), ensures your URLs are universally valid, and maintains data integrity across different web systems and browsers, especially for international content.
My spreadsheet contains URLs with percent-encoded characters like %20 or %2F. How can I quickly decode them to make them readable for analysis?
This tool is perfect for cleaning up such data! Copy the percent-encoded URL (or a list of them) from your spreadsheet into the decoder. It will convert characters like `%20` back to spaces and `%2F` to slashes, making the URLs human-readable. This is crucial for verifying links, extracting specific parameters, or preparing data for reports without manual text editing.
How do I properly encode URL parameters when making a REST API request?
When building URLs for REST API calls, it's crucial to encode parameter values to prevent issues with special characters like spaces, ampersands, or slashes. These can break your request or lead to incorrect data interpretation. Use the `encodeURIComponent` mode of this tool for each parameter's value before appending it to the URL, ensuring your API requests are valid and reliable.
When building dynamic URLs from user input or database entries, how do I ensure special characters are correctly encoded?
For dynamic URLs, especially those constructed from user-submitted text or database queries, it's crucial to use `encodeURIComponent` for each path segment or query parameter value. This tool helps by converting spaces, ampersands, slashes, and other special characters into their safe percent-encoded forms. This prevents broken links, ensures correct parsing by browsers and servers, and maintains URL integrity, which is vital for SEO and user experience.
How to Use
- Select the encoding mode: encodeURIComponent (for parameters) or encodeURI (for full URLs)
- Enter or paste your URL/text in the input box
- Click Encode to percent-encode, or Decode to convert back
- Use Swap to exchange input and output for quick re-processing
- All processing happens locally in your browser