URL Encoder & Decoder FAQ
Q: What is URL encoding and why is it needed?
URL encoding (also called percent-encoding) converts characters into a format that can be safely transmitted over the internet. URLs can only contain a limited set of characters from the ASCII character set. Characters outside this set — such as spaces, non-ASCII characters like Chinese or Arabic, and special characters like &, ?, # — must be encoded. For example, a space becomes %20, and the Chinese character 你好 becomes %E4%BD%A0%E5%A5%BD. Our free URL encoder/decoder handles all of this automatically.
Q: What is the difference between encodeURI and encodeURIComponent?
encodeURI is designed to encode a complete URL. It preserves characters that have special meaning in a URL structure: :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, and =. This makes it suitable for encoding an entire URL without breaking its structure.
encodeURIComponent encodes every special character except: A-Z a-z 0-9 - _ . ! ~ * ' ( ). It is designed to encode individual URL components like query parameter values. Use encodeURIComponent when you need to safely include user input in a query string.
Use our free online URL encoder to see the difference between both modes in real time.
Q: How do I decode a URL-encoded string?
Simply paste the encoded string into the decode mode of our URL encoder/decoder tool. It will automatically convert percent-encoded sequences back to their original characters. All decoding is done locally in your browser — no data is sent to any server.
Q: What characters must be URL encoded?
The following characters must always be encoded: space (becomes %20 or +), " (becomes %22), < (%3C), > (%3E), # (%23), % (%25), { (%7B), } (%7D), | (%7C), \ (%5C), ^ (%5E), ~ (%7E), [ (%5B), ] (%5D), and backtick ` (%60). Non-ASCII characters (any character code above 127) must also be encoded using UTF-8 byte sequences.
Q: Is URL encoding the same as Base64 encoding?
No. URL encoding (percent-encoding) converts unsafe characters to %XX hexadecimal sequences and is used for URL safety. Base64 encoding converts binary data to a radix-64 text representation. They serve completely different purposes. If you need Base64 encoding, use our Base64 encoder/decoder.