URL Encoder / Decoder
What Is It?
The URL Encoder / Decoder converts special characters in URLs to their percent-encoded equivalents and back. Percent-encoding (also called URL encoding) replaces unsafe ASCII characters with a % followed by two hexadecimal digits.
This tool works entirely in your browser — no data is uploaded to any server.
How to Use
- Select Encode or Decode mode using the toggle buttons.
- Paste your URL or text into the input field.
- The conversion happens automatically as you type.
- Click Copy to copy the result to your clipboard.
Example
Encoding:
Input: https://example.com/search?q=hello world&lang=en
Output: https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den
Decoding:
Input: %7B%22name%22%3A%22Alice%22%7D
Output: {"name":"Alice"}
Benefits
- Instant conversion — encode or decode as you type with no delay.
- Bidirectional — easily switch between encode and decode modes.
- Handles all special characters — spaces, angle brackets, quotes, and more.
- 100% private — your URLs never leave your browser.
Common Use Cases
- Encoding query parameters before embedding in API requests.
- Decoding percent-encoded URLs received in logs or analytics.
- Building properly formatted request strings for REST APIs.
- Escaping special characters in redirect URLs.
- Debugging malformed URLs in web applications.
Technical Deep Dive
URL encoding is defined by RFC 3986. It specifies that certain characters in a URL must be encoded to avoid ambiguity. For example, a space character becomes %20, an ampersand & becomes %26, and a plus + becomes %2B.
This tool uses the browser’s built-in encodeURIComponent() and decodeURIComponent() functions to perform conversions, which faithfully follow the RFC 3986 specification.
Frequently Asked Questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI is designed to encode a complete URL, leaving characters like /, ?, #, and & intact since they are meaningful in a URL. encodeURIComponent encodes everything including these characters, making it better suited for encoding individual query parameter values. Our tool uses encodeURIComponent for maximum compatibility.
Why does a space become %20 and not +?
URL encoding has two standards: RFC 3986 uses %20 for spaces, while application/x-www-form-urlencoded (used in HTML forms) uses +. Our tool follows RFC 3986, using %20. Some tools used for form data use +, which our decoder also handles.
Can I decode a full URL at once?
Yes. Paste the full encoded URL and switch to Decode mode. The tool will decode all %XX sequences back to their original characters.