URL Encoder & Decoder
Encode or decode URLs using standard percent encoding or form-style query encoding.
1
1
Characters: 0
Mode
Encoding type
Percent-encodes text so it is safe inside a URL, and decodes encoded URLs back to readable text — for query parameters, redirect links, API calls and debugging. It runs in your browser.
Options
- URL component (RFC 3986) — encodes everything except letters, digits and
- _ . ~, as RFC 3986 requires. Use it for a single value: a query parameter, a path segment, a redirect URL passed as a parameter. - Preserve reserved characters — with URL Component encoding, keeps
: / ? # [ ] @ ! $ & ' ( ) * + , ; =as they are, so a whole URL stays a working URL while spaces and other characters are encoded. Reserved characters inside a value are kept too — an&in a search term would split it into two parameters, as the table below shows — so encode such values on their own. - Form / query string — the encoding HTML forms use: spaces become
+, and decoding turns+back into spaces. - Trim input — ignores spaces at the start and end; on by default.
Text is encoded as UTF-8, so é becomes %C3%A9. Encoding text that is already encoded encodes the % signs again; decode it first. An invalid sequence such as a lone % shows an error when decoding.
One URL, three encodings
| Encoding | Result |
|---|---|
| URL component | https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dchai%20%26%20coffee%21%26lang%3Dhi |
| URL component, reserved characters preserved | https://example.com/search?q=chai%20&%20coffee!&lang=hi |
| Form / query string | https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dchai+%26+coffee%21%26lang%3Dhi |
See also
- Base64 Encoder & Decoder — for Base64, another way to make data URL-safe.
- cURL Command Generator — to turn the URL into a ready-to-run request.