URL Encoder Decoder - Encode and Decode URLs Online

Free online URL encoder and decoder. Encode URLs using percent encoding and decode encoded URLs instantly.

What is URL Encoding?

URL encoding (also called percent encoding) is a mechanism for encoding information in a Uniform Resource Identifier (URI) under certain circumstances. It converts characters into a format that can be transmitted over the Internet. Characters that are not allowed in URLs are replaced with a percent sign (%) followed by two hexadecimal digits representing the character's ASCII code. For example, spaces become %20, and @ becomes %40.

Why URLs Need Encoding

URLs can only contain certain characters from the ASCII character set. Reserved characters like spaces, quotation marks, ampersands, and non-ASCII characters (such as Chinese, Japanese, or emoji) must be encoded to ensure they are correctly transmitted. URL encoding replaces unsafe characters with their percent-encoded equivalents, making URLs safe for use in web addresses, query parameters, and API requests.

Percent Encoding Examples

CharacterEncoded
%20
@%40
#%23
&%26
你好%E4%BD%A0%E5%A5%BD

How to Use URL Encoder Decoder

  1. 1

    Paste your URL or text into the input area

  2. 2

    Click "Encode" to convert special characters to percent-encoded format

  3. 3

    Click "Decode" to convert percent-encoded URLs back to readable text

  4. 4

    Use "Copy" to copy the result or "Clear" to start over

Frequently Asked Questions

What is percent encoding?

Percent encoding is a method of encoding characters in URLs by replacing unsafe characters with a % symbol followed by two hexadecimal digits. For example, a space character is encoded as %20, because 20 is the hexadecimal value for the space character's ASCII code (32 in decimal).

What is the difference between encodeURI and encodeURIComponent?

encodeURI is designed to encode an entire URL and preserves characters that have meaning in the URL structure (like /, ?, &, =). encodeURIComponent encodes individual URL components (like query parameter values) and encodes all special characters including /, ?, &, =. Our tool uses encodeURIComponent for comprehensive encoding.

When should I use URL encoding?

You should use URL encoding whenever you include special characters in URLs, especially in query parameters, path segments with spaces or non-ASCII characters, and when programmatically constructing URLs from user input. Proper encoding ensures your URLs remain valid and data is transmitted correctly.

Is my data sent to a server?

No. All encoding and decoding happens entirely in your browser using JavaScript. Your data never leaves your device — we do not upload, store, or share any data. Your privacy is fully protected.