Tools

URL Encoder/Decoder

URL-encode text or decode URL-encoded strings.

How to Calculate

URL encoding (Percent-encoding) converts characters that cannot be used in URLs into a % symbol followed by a hexadecimal value. Common use cases: • Including special characters in URL query parameters • Submitting form data • Handling special characters in API requests For example, a space becomes %20, and the Korean character '가' becomes %EA%B0%80.

Example

Input: Hello World! Encoded: Hello%20World! Input: https://example.com/search?q=test Encoded: https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dtest

FAQ

What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI but leaves URI delimiters like :, /, ?, # intact. encodeURIComponent encodes all special characters, making it suitable for query parameter values. This tool uses the encodeURIComponent method.
Why is a space sometimes %20 and sometimes +?
%20 follows RFC 3986 (URI standard), while + follows application/x-www-form-urlencoded (HTML form submission). Modern APIs recommend %20, and this tool uses %20.
Why do non-ASCII characters look so long after encoding?
Non-ASCII characters are first encoded in UTF-8, then each byte becomes a %XX sequence. For example, the Korean character "가" becomes %EA%B0%80 (3 bytes). Browsers auto-decode these in the address bar, but the encoded form appears when copied.
Which characters do not need URL encoding?
Per RFC 3986, the "unreserved characters" A-Z, a-z, 0-9, -, _, ., and ~ are not encoded.

Related Tools