When to use the URL Encoder
Building query strings
Safely add search terms, names or addresses to a URL, even when they contain spaces, & or #.
Redirect and callback URLs
Encode a full URL so it can be passed as a single parameter, for example in OAuth flows.
Campaign links
Encode UTM values that contain spaces or symbols so analytics records them correctly.
Non-English text in links
Turn Urdu, Arabic, Chinese or emoji text into a format every browser and server accepts.
Features and benefits
- Component mode (like encodeURIComponent) and full-URL mode (like encodeURI)
- UTF-8 percent-encoding for any language and emoji
- Optional + for spaces in form-style query strings
- Live output as you type
Example
coffee & tea / café
coffee%20%26%20tea%20%2F%20caf%C3%A9
How the URL Encoder works
Component mode works like JavaScript’s encodeURIComponent: every character except letters, digits and - _ . ! ~ * ' ( ) is converted into UTF-8 bytes written as %XX. Full-URL mode works like encodeURI and leaves characters that structure a URL – such as : / ? & = and # – untouched, so a complete address keeps working. The form-style option writes spaces as + for application/x-www-form-urlencoded data.
A real-life example
A shop owner wants a WhatsApp link that opens with a ready message: “Hi! Is the blue kurta (size M) available?” Pasting the message in component mode gives Hi!%20Is%20the%20blue%20kurta%20(size%20M)%20available%3F, which she adds after https://wa.me/923001234567?text=. The link now opens WhatsApp with the full message, including the question mark, instead of cutting it off.
Good to know
URLs can contain only a limited set of characters. Others – spaces, &, #, accents and emoji – must be written as a percent sign followed by two hexadecimal digits for each UTF-8 byte.
Choosing the right mode matters. To build a link like ?q=VALUE, encode just the value with “Encode everything”; otherwise an & inside the value would start a new parameter. “Encode as full URL” is for tidying a whole address while keeping its structure.
Tips for the best results
- Encode each parameter value separately, then join them with & – not the whole query string at once.
- Use full-URL mode only for complete addresses that already have the right structure.
- Use + for spaces only in form-style query strings; use %20 elsewhere.
- Decode the result with the URL Decoder to double-check it.
Common mistakes to avoid
Encoding twice
%20 becomes %2520 and the text shows literal % signs. Encode the original text only once.
Encoding a whole URL in component mode
The :// and / become %3A%2F%2F and the link breaks. Use full-URL mode.
Leaving & unencoded inside a value
The server will think a new parameter has started.
URL Encoder – frequently asked questions
Should spaces be %20 or +?
%20 works everywhere in a URL. The + sign means a space only in query strings sent by HTML forms. When in doubt, use %20.
What is the difference between the two modes?
“Encode everything” escapes reserved characters like / ? & = so the text can be a single value. “Encode as full URL” keeps them so the address still works.
Why does é become %C3%A9?
URLs use UTF-8, and é is two bytes in UTF-8 (C3 and A9). Each byte is written as a percent code.
How do I decode the result?
Use the URL Decoder.
Which characters must be encoded in a URL?
Spaces, quotes, < >, #, %, and any non-ASCII characters, plus & = ? / when they are part of a value.
Is URL encoding the same as percent-encoding?
Yes. Both names describe the same %XX format.
Do I need to encode URLs in HTML links?
Browsers fix many simple cases automatically, but encoding values yourself avoids broken links when text contains spaces, & or #.