Free · Instant · Client-Side Only
Percent-encode URLs and query parameters or decode %20-style encoded strings. Choose encodeURIComponent or encodeURI mode. Runs in your browser.
encodeURIComponent — encodes everything including & = ? # / — use for query parameter values
What is URL encoding (percent encoding)?
URL encoding replaces characters that are not allowed or have special meaning in URLs with a % followed by their hexadecimal ASCII value. For example, a space becomes %20, & becomes %26, and = becomes %3D. This ensures URLs can be transmitted safely without ambiguity.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL and preserves structural characters like : / ? # & = @. encodeURIComponent encodes an individual URL component (like a query parameter value) and escapes all special characters including & = + and ?. Use encodeURIComponent for values you embed inside query strings.
Why does my URL have %20 instead of a space?
%20 is the percent-encoded representation of a space (ASCII 32, hex 0x20). Spaces are not valid in URLs. You may also see + used for spaces in query strings (HTML form encoding), but %20 is the standard URL encoding.
When do I need to URL encode a string?
URL encode whenever you embed user input or dynamic values into a URL — especially query parameters. If a search term is 'hello world & more', it must be encoded as 'hello%20world%20%26%20more' before appending to a URL. Failing to encode can break URL structure or cause parameter injection.
What characters are safe in URLs without encoding?
Unreserved characters safe in all URL positions: A–Z, a–z, 0–9, hyphen (-), underscore (_), period (.), tilde (~). All other characters should be percent-encoded when used in URL components. Structural characters like /, ?, #, &, = are safe in their correct structural positions but must be encoded inside parameter values.
How do I decode a URL with %20 and percent codes in JavaScript?
Use decodeURIComponent('%20') → ' ' for individual components, or decodeURI() for full URLs. In Python: urllib.parse.unquote(encoded_string). In PHP: urldecode($encoded). In Java: URLDecoder.decode(encoded, StandardCharsets.UTF_8).
| Feature | Anvya AI | urlencoder.org | Browser console |
|---|---|---|---|
| Encode + Decode in one place | ✓ | Partial | Partial |
| encodeURIComponent vs encodeURI choice | ✓ | ✗ | ✓ |
| Swap output→input button | ✓ | ✗ | ✗ |
| Explains what each mode does | ✓ | ✗ | ✗ |
| No ads, no signup | ✓ | ✗ | ✓ |
| Works offline | ✓ | ✗ | Partial |
| Free forever | ✓ | ✓ | ✓ |