URL Encode
Type text and it is instantly converted into a URL-safe format: accents, spaces and characters such as & and ? become percent-encoded %XX sequences, so they work in links, API parameters and tracking URLs. Encode just a parameter value, or a whole URL with its structure kept. To turn %XX back into text, switch to the decode tab above or use URL Decode. Everything runs in your browser – nothing is uploaded.
How to use the URL encoder
- Type or paste text; the result appears instantly – “café” becomes
caf%C3%A9. - Choose how to encode: “Parameter value (encode everything)” (default) encodes every special character, for values after
?q=; “Whole URL (keep : / ? & = #)” keeps: / ? & = #and only encodes accents and spaces, for turning a whole link into a shareable URL. - Options: “Spaces as +” for HTML form format, “Strict RFC 3986 (also encode ! ' ( ) *)” for APIs such as OAuth signatures, and “Encode each line separately” to process a list of keywords or URLs.
- Click “Copy” or “Send to decode” to decode it again and check.
What is URL encoding (percent-encoding)?
URLs may only contain a small set of ASCII characters. Everything else – accented letters, other scripts, spaces and some symbols – is written as % followed by two hexadecimal digits. This is percent-encoding, also called URL encoding. Non-ASCII text is first converted to UTF-8 bytes and each byte becomes one %XX, so a single accented letter or non-Latin character turns into two to four groups:
| Text | UTF-8 bytes | URL-encoded |
|---|---|---|
| café | 63 61 66 C3 A9 | caf%C3%A9 |
| Space | 20 | %20 (+) |
& | 26 | %26 |
# | 23 | %23 |
Which characters need encoding?
| Type | Characters | Encode? |
|---|---|---|
| Unreserved | A–Z, a–z, 0–9, -, _, ., ~ | Never – usable anywhere |
| Reserved | : / ? # [ ] @ ! $ & ' ( ) * + , ; = | Not when used as URL structure; yes inside a parameter value |
| Everything else | accented letters, other scripts, space, %, ", <, > | Always |
For example, if you search for “AT&T” without encoding &, the URL becomes ?q=AT plus a separate parameter T.
Parameter value vs. whole URL
- Parameter value (
encodeURIComponent) also encodes/ ? & = :. Use it for a single value or path segment. - Whole URL (
encodeURI) keeps the characters that form the URL structure and only encodes the rest.
Encoding a full URL as a parameter value gives https%3A%2F%2F… – which is exactly what you need when putting a URL inside another URL’s parameter, such as ?redirect=.
%20 or +?
In paths and most parts of a URL, a space is %20. In query strings sent by HTML forms (application/x-www-form-urlencoded), a space is written as + – Google search URLs use this format. This tool uses %20 by default; tick “Spaces as +” to get +.
URL encoding in each programming language
| Language | Parameter value (space → %20) | Form format (space → +) |
|---|---|---|
| JavaScript | encodeURIComponent(s) | new URLSearchParams({ q: s }).toString() |
| Python | urllib.parse.quote(s, safe='') | urllib.parse.quote_plus(s) |
| Java | URLEncoder.encode(s, UTF_8).replace("+", "%20") | URLEncoder.encode(s, UTF_8) |
| C# | Uri.EscapeDataString(s) | WebUtility.UrlEncode(s) |
| PHP | rawurlencode($s) | urlencode($s) |
| Go | url.PathEscape(s) | url.QueryEscape(s) |
Frequently asked questions
Why do URLs turn into strings like %C3%A9?
URLs can only contain ASCII letters, digits and a few symbols, so other characters are converted to UTF-8 bytes and written as %XX percent-encoding. Browsers often display the readable version in the address bar, but copying the link gives you the encoded form – both are the same URL.
What is the difference between %20 and +?
Both mean a space. %20 works everywhere in a URL; + only means a space in form-style query strings, while in a path it is a literal plus sign. When in doubt, use %20.
When should I use “whole URL” and when “parameter value”?
Use “whole URL” to turn a complete link containing non-ASCII characters into a shareable URL; it keeps :/?&= intact. Use “parameter value” to encode a single value such as a search term, or to put an entire URL inside another URL’s parameter.
Is URL encoding a form of encryption?
No. It is only a format change that lets characters travel safely in a URL. Anyone can decode it, so it does not hide usernames, passwords or other data.
Is my data uploaded?
No. Encoding happens directly in your browser; nothing is sent to this site or any third-party server.
- URL Decode: turn %XX back into text and break down URL parameters.
- Base64 Encode: convert text and images to Base64.
- UUID generator: generate v4/v7 unique IDs.