Encode and decode URLs instantly. Convert special characters to URL-safe format and back.
URL encoding replaces unsafe ASCII characters with a percent sign (%) followed by two hexadecimal digits. For example, a space becomes %20, and an ampersand becomes %26.
This tool uses JavaScript's built-in encodeURIComponent() and decodeURIComponent() functions, which handle the full range of Unicode characters.
URL encoding (also called percent encoding) converts special characters into a format that can be safely transmitted over the Internet. Characters that are not allowed in URLs (like spaces, ampersands, and non-ASCII characters) are replaced with a % followed by their hexadecimal ASCII code.
For example, a space becomes %20, and an ampersand becomes %26. This ensures URLs work correctly across all browsers and servers.
| Character | Encoded | Description |
|---|---|---|
| %20 | Space | |
| & | %26 | Ampersand |
| / | %2F | Forward slash |
| ? | %3F | Question mark |
| # | %23 | Hash / pound |
| = | %3D | Equals sign |
| + | %2B | Plus sign |
| % | %25 | Percent sign |
URL encoding (also called percent encoding) converts characters that are not allowed in a URL into a format that can be transmitted over the Internet. For example, a space becomes %20, an ampersand (&) becomes %26, and a question mark (?) becomes %3F.
You need to encode URLs when passing special characters in query parameters, form submissions, API calls, or when embedding a URL inside another URL. For example, if your search query contains spaces or symbols, those must be encoded.
encodeURI keeps the URL structure intact (preserves ://, /, ?, #). encodeURIComponent encodes everything including those characters. Use encodeURIComponent for query parameter values, and encodeURI for full URLs.
Yes, URL encoding and percent encoding are the same thing. The term "percent encoding" comes from the use of the percent sign (%) followed by two hexadecimal digits to represent each encoded character.
No. All encoding and decoding happens entirely in your browser using JavaScript. Your input is never sent to or stored on any server, making this tool completely private and secure.
URL encoding (percent encoding) converts special characters into a safe format for URLs. Characters like spaces, ampersands, and non-ASCII characters are replaced with % followed by their hex code (e.g., space = %20).
Encode URLs when passing special characters in query parameters, form submissions, API calls, or when embedding URLs within other URLs. Always encode user input before including it in URLs.
encodeURI keeps URL structure intact (://, /, ?, # are preserved). encodeURIComponent encodes everything including these characters. Use encodeURIComponent for query parameter values.
Explore our collection of free online tools