URL Encoder & Decoder
Encode special characters for URLs or decode percent-encoded strings back to readable text.
No data sent to serverRelated Tools
What is URL Encoding?
URL encoding (also called percent-encoding) is a mechanism for converting characters that are not allowed in a URL into a format that can be transmitted over the internet. Special characters like spaces, ampersands (&), and non-ASCII characters are replaced with a percent sign (%) followed by their hexadecimal byte values.
For example, a space becomes %20, an ampersand becomes %26, and the Japanese character "東" becomes %E6%9D%B1. URL encoding is defined by RFC 3986 and is essential for building valid query strings, form submissions, and API requests.
This tool uses JavaScript's encodeURIComponent() for encoding, which encodes all characters except A-Z a-z 0-9 - _ . ~ ! * ' ( ). For decoding, it uses decodeURIComponent() to restore the original text.
How to Use
- Paste your plain text or URL-encoded string into the input box.
- Click "Encode" to percent-encode the text, or "Decode" to convert it back.
- Copy or download the result.
FAQ
What is the difference between encodeURI and encodeURIComponent?
encodeURI() encodes a full URI but leaves reserved characters like : / ? # & intact. encodeURIComponent() (used by this tool) encodes everything except basic alphanumeric characters, making it suitable for encoding individual query parameter values.
Why do I need to URL-encode query parameters?
Characters like &, =, and ? have special meaning in URLs. If your parameter values contain these characters, they must be encoded to prevent them from being misinterpreted as URL delimiters.
Does it handle Unicode characters?
Yes. Non-ASCII characters are encoded as their UTF-8 byte sequences in percent-encoded form. For example, a single CJK character may produce multiple %XX sequences.