URL Encode & Decode
Encode text for URLs or decode URL-encoded strings back to text. Instant, free, private.
What Is URL Encoding?
URL encoding, also known as percent-encoding, is a method of representing characters in a URL using a percent sign (%) followed by two hexadecimal digits. It is defined in RFC 3986 and ensures that special characters, spaces, and non-ASCII text are safely transmitted as part of a URL.
For example, a space becomes %20, an ampersand becomes %26, and a Cyrillic letter like "п" becomes %D0%BF. Without encoding, these characters would break URL parsing or be misinterpreted by servers and browsers.
URL encoding is essential when constructing query strings, form data, redirect URLs, deep links, API requests, and any URL that contains user-generated content or non-ASCII characters.
How to Use This Tool
- Choose a mode — click Encode to convert text to URL-encoded format, or Decode to convert encoded text back to plain text.
- Select encode type — in Encode mode, choose Component for query parameter values or Full URL to preserve URL structure.
- Enter your input — type or paste into the left textarea. Conversion happens in real time.
- Copy the result — click the Copy button or select the text in the output area.
- Swap directions — click Swap to move the output into the input and flip the mode automatically.
The tool supports full Unicode including Cyrillic, Chinese, Japanese, Korean, emoji, and special characters. All processing happens in your browser — nothing is sent to a server.
encodeURIComponent vs encodeURI
| Component | Full URL | |
|---|---|---|
| Function | encodeURIComponent() | encodeURI() |
| Encodes | All characters except A-Z a-z 0-9 - _ . ! ~ * ' ( ) | Only non-URL characters (spaces, Unicode) |
| Use for | Query parameter values, form data | Complete URLs with Unicode paths |
| Example | a&b → a%26b | a&b → a&b |
Common Use Cases
Query Parameters
Encode values before adding them to URL query strings. Characters like &, =, and ? must be encoded to avoid breaking the URL structure.
API Requests
Encode user input, search terms, and filter values when building API URLs. Proper encoding prevents server errors and injection vulnerabilities.
Redirect URLs
Encode destination URLs passed as parameters in OAuth flows, SSO redirects, and deep links to ensure the full URL is treated as a single value.
Internationalized URLs
Encode URLs containing non-ASCII characters like Cyrillic, Chinese, Arabic, or emoji so they work correctly across all browsers and servers.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent-encoding) replaces unsafe characters with a percent sign followed by two hex digits. For example, a space becomes %20 and an ampersand becomes %26. It is defined in RFC 3986 and ensures characters are safely transmitted in URLs.
What is the difference between Component and Full URL encoding?
Component encoding (encodeURIComponent) encodes all special characters including : / ? # & =. Use it for query parameter values and form data. Full URL encoding (encodeURI) preserves URL structure characters and only encodes non-URL characters. Use it for complete URLs with Unicode paths.
Why is + not decoded as a space?
The + sign representing a space is a convention from HTML form encoding (application/x-www-form-urlencoded), not standard percent-encoding (RFC 3986). This tool uses standard percent-encoding where %20 is a space and + is a literal plus sign.
What happens if I encode an already-encoded string?
You get double encoding. For example, %20 becomes %2520 because the percent sign itself is encoded to %25. This is correct and expected behavior. The tool does not try to detect or skip already-encoded sequences.
Is my data sent to a server?
No. All encoding and decoding happens 100% in your browser using JavaScript. No data is transmitted anywhere. Your text never leaves your device.
What is the maximum input size?
There is no hard limit. URL encoding and decoding are fast, linear operations processed entirely in your browser. Even very large inputs are handled instantly. For bulk processing, consider command-line tools like Python's urllib.parse or Node.js.