URL Encoder / Decoder

Encode special characters in URLs using percent-encoding, or decode percent-encoded URLs back to readable text.

Common Encoded Characters

How It Works

Paste your URL or text into the input field. Click Encode to convert special characters to their percent-encoded equivalents, or click Decode to convert percent-encoded characters back to readable text.

URLs can only contain a limited set of characters defined by the RFC 3986 standard. Special characters like spaces, ampersands, and accented letters must be percent-encoded before being included in a URL. Our URL encoder converts these characters automatically.

**What is URL Encoding?**

URL encoding (also called percent-encoding) replaces unsafe characters with a `%` sign followed by two hexadecimal digits representing the character's ASCII code. For example, a space becomes `%20`, and `&` becomes `%26`.

**When Do You Need URL Encoding?**

- Building URLs with query parameters containing special characters
- Encoding form data submitted via GET requests
- Passing JSON or file paths as URL parameters
- Working with REST APIs that require encoded parameters
- Sharing URLs that contain accented characters or non-Latin scripts

**encodeURI vs encodeURIComponent**

JavaScript provides two encoding functions. `encodeURI()` encodes a full URL and preserves characters like `/`, `?`, `#`, and `&`. `encodeURIComponent()` encodes a URL component (like a query parameter value) and converts all special characters. Use `encodeURIComponent()` when encoding individual query parameter values.

**URL Encoding vs HTML Encoding**

URL encoding and HTML encoding serve different purposes. URL encoding is for safe transmission of data in URLs. HTML encoding (like `&` for `&`) prevents cross-site scripting in HTML documents.

**Privacy**

All encoding and decoding is performed locally in your browser. No data is sent to our servers.

Frequently Asked Questions

URL encoding converts special characters into a format that can be transmitted safely in a URL. It replaces unsafe characters with a % sign followed by two hexadecimal digits.
The space character (ASCII 32) is represented as %20 in URLs. Some forms also encode spaces as + signs, but %20 is the standard encoding.
encodeURI encodes a full URL and skips characters like / and ?. encodeURIComponent encodes a URL component like a query parameter value, converting / and ? as well.
Usually, only the query parameter values need encoding. Encoding the entire URL would break the protocol, domain, and path separators.
Yes. Non-ASCII characters like accented letters and Chinese characters are first converted to UTF-8 bytes, then each byte is percent-encoded.