URL Encoder & Decoder
Encode special characters for safe URLs or decode percent-encoded strings back to readable text.
Common URL Encodings
| Character | (space) | ! | # | $ | & | ' | ( | ) | * | + | , | / | : | @ | = | ? |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Encoded | %20 | %21 | %23 | %24 | %26 | %27 | %28 | %29 | %2A | %2B | %2C | %2F | %3A | %40 | %3D | %3F |
Free Online URL Encoder & Decoder
URL encoding (also called percent-encoding) converts special characters in URLs into a format that can be safely transmitted over the internet. Characters like spaces, ampersands, and question marks have special meaning in URLs, so they must be encoded when used in query parameters or path segments.
When to Use URL Encoding
Encode URL query parameters that contain spaces or special characters. Encode file paths with non-ASCII characters (like accented letters or CJK characters). Prepare strings for use in API requests and webhook URLs. Debug encoded URLs by decoding them back to readable text. Build dynamic URLs in JavaScript, Python, or other programming languages.
encodeURI vs encodeURIComponent
JavaScript offers two encoding functions. encodeURI encodes a full URL but preserves characters that have meaning in URLs (like /, ?, #, &). encodeURIComponent encodes everything except letters, digits, and a few safe characters — use this for encoding individual query parameter values. This tool uses encodeURIComponent by default (the "Encode full component" option), which is the correct choice for most use cases.
Frequently Asked Questions
Both are valid. The + encoding for spaces comes from the application/x-www-form-urlencoded format (used in HTML form submissions). The %20 encoding is the standard percent-encoding defined in RFC 3986. Most modern systems accept both, but %20 is more universally compatible.
Only encode the parts that contain user input or special characters — typically query parameter values and sometimes path segments. Don't encode the protocol (https://), domain, or structural characters (/, ?, &, =) unless they appear inside a parameter value.