URL Encoder & Decoder

Encode and decode URLs, query strings, and special characters β€” instantly in your browser. No data leaves your device.

Encoding Method:
0 chars
0 chars
Batch Mode β€” Process multiple URLs at once

Enter one URL per line:

What is URL Encoding?

URL encoding, also known as percent-encoding, replaces unsafe ASCII characters with a % followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures URLs are transmitted correctly across the internet.

encodeURIComponent vs encodeURI

encodeURIComponent() encodes all special characters β€” ideal for query parameter values. encodeURI() preserves structural characters like :, /, ?, and # β€” suitable for encoding complete URIs.

Base64 Encoding

Base64 converts binary data into an ASCII string using 64 printable characters. It's commonly used for embedding data in URLs, encoding email attachments, and transmitting binary data over text-based protocols.

When to Use URL Encoding

Use URL encoding when passing data through query strings, handling form submissions, working with APIs, or when URLs contain special characters like spaces, ampersands, or non-ASCII characters such as umlauts or emoji.

HTML Entity Encoding

HTML entity encoding converts special characters to entity equivalents (e.g., & β†’ &). This prevents browsers from interpreting characters as markup and protects against XSS attacks.

Punycode

Punycode encodes Unicode characters for Internationalized Domain Names (IDN). For example, mΓΌnchen.de becomes xn--mnchen-3ya.de, allowing non-ASCII domain names to work within DNS infrastructure.

Common URL Encoding Reference

CharacterEncodedDescription
(space)%20Space character
!%21Exclamation mark
#%23Hash / fragment
&%26Ampersand
+%2BPlus sign
/%2FForward slash
:%3AColon
=%3DEquals sign
?%3FQuestion mark
@%40At sign