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.