🔗

URL Encoder & Decoder

Free online URL encoder and decoder. Instantly encode or decode URLs with encodeURIComponent and encodeURI modes.

Input
Result

Private & Secure

Your data stays in your browser. No text is ever sent to a server.

Instant Conversion

Real-time encoding and decoding as you type. No page reloads or waiting.

Dual Encoding Modes

Switch between encodeURIComponent and encodeURI for precise control over URL formatting.

Frequently Asked Questions

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.

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.

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.

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.

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.

Related Tools

URL Encode & Decode Online - Free URL Encoder - CoolTool