URL Encoder: Encode Special Characters for Web URLs
Use our free URL Encoder to safely convert text for use in web addresses. It ensures your URLs are correctly formatted and work across all browsers and servers. Paste your text and get the encoded result instantly.
URL Encoder
Encode special characters in a URL for internet transmission
Encoding Modes
How it works
URLs can only carry a limited set of characters safely. Spaces, ampersands, non-English letters and many symbols have to be replaced with a percent sign followed by two hex digits, so a space becomes %20. Type or paste your text, choose a mode and press Encode. The result appears below and can be copied with one click. The conversion happens in your browser, and your text is not sent anywhere.
The tool offers three modes, and they give different results on the same input.
- Full Encode runs JavaScript's encodeURIComponent. It escapes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single value that goes inside a query string, such as a search term or a redirect address.
- encodeURI is meant for a whole address. It leaves reserved characters such as : / ? # & = alone, so https://example.com/a b becomes https://example.com/a%20b and still works as a link.
- Component keeps a broader set of safe and reserved characters (including / ? : @ & = + $ , ; and square brackets) and escapes the rest by hand.
Which mode should you pick?
The question to ask is whether your text is a complete URL or just one piece of it. If it is a piece, such as the value of a parameter, use Full Encode. Otherwise a value like a&b=c would keep its ampersand and equals sign and break the query string into extra parameters. If it is a complete URL with spaces or accents in it, use encodeURI so the scheme, slashes and query separators survive.
A common mistake is running Full Encode on an entire URL. You end up with https%3A%2F%2Fexample.com%2F..., which is correct as a parameter value but is no longer a clickable address.
What to know before you rely on it
Full Encode and encodeURI follow the standard JavaScript functions, so non-ASCII text such as accented letters or emoji is converted to UTF-8 bytes first. The result is what servers and browsers expect. The Component mode escapes each character by its raw code number instead, which is fine for ASCII but does not produce UTF-8 for characters outside basic Latin. For anything international, stick with Full Encode or encodeURI.
Encoding is not encryption. Anyone can reverse percent-encoding, so do not treat it as a way to hide data. Also avoid encoding the same string twice. A percent sign is itself escaped, so %20 turns into %2520 on a second pass. If you need to reverse the process, the URL Decoder on this site does that.
The tool encodes exactly what you type, including line breaks, which become %0A. It does not validate that your input is a real URL.
Frequently asked questions
Why does my space turn into %20 and not a plus sign?
All three modes use %20, which is valid anywhere in a URL. The plus sign for spaces is a convention of HTML form submissions in the query string only, and this tool does not produce it.
Is the plus sign encoded?
In Full Encode, yes: + becomes %2B. In encodeURI and Component mode a plus sign is left as it is, so encode it with Full Encode if it must be read literally in a query value.
Does it work for large text?
Encoding runs locally, so the limit is your browser's memory rather than a server cap. Very long URLs may still be rejected by the server or browser that receives them.
How do I decode the result?
Paste the encoded string into the URL Decoder or the Percent Encoding Decoder listed below to get the original text back.