URL Encoder / Decoder
Encode special characters for safe URLs or decode percent-encoded strings back to readable text. 100% client-side.
How to Encode / Decode URLs
Paste
Enter your text, URL, or percent-encoded string into the input area.
Convert
The result appears instantly as you type. Switch between Encode and Decode modes with one click.
Copy
Click Copy Result or use the Swap button to move the output back to input for further processing.
What is URL Encoding?
URL encoding (also called percent-encoding) is a mechanism for encoding special characters in a Uniform Resource Identifier (URI). It replaces unsafe ASCII characters with a % followed by two hexadecimal digits representing the character's byte value.
For example, a space character becomes %20, an ampersand becomes %26, and a non-ASCII character like é becomes %C3%A9 (its UTF-8 byte sequence). URL encoding is defined in RFC 3986 and is essential for transmitting data reliably in URLs, query strings, and form submissions.
Common Encoded Characters
| Character | Encoded | Description |
|---|---|---|
(space) | %20 or + | Space character |
& | %26 | Ampersand (separates query params) |
= | %3D | Equals sign (key=value separator) |
? | %3F | Question mark (query string start) |
# | %23 | Hash/fragment identifier |
/ | %2F | Forward slash (path separator) |
@ | %40 | At sign |
+ | %2B | Plus sign |
encodeURIComponent vs encodeURI
encodeURIComponent encodes all special characters except - _ . ! ~ * ' ( ). Use it for encoding individual query parameter values, form fields, or any text that will be embedded inside a URL.
encodeURI preserves characters that have special meaning in URLs: : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Use it when encoding a complete URL that should remain navigable.
Frequently Asked Questions
%20. In HTML form data (application/x-www-form-urlencoded), spaces are represented as +. Both are valid but used in different contexts. This tool uses %20 by default (RFC 3986 standard).