How to URL-encode text
Only some characters are allowed in URLs. Others — spaces, accented letters, special characters — are written as % plus the byte code in UTF-8. For example a space is %20, “è” is %C3%A8 and “&” is %26.
“crème brûlée & 100%” encoded is cr%C3%A8me%20br%C3%BBl%C3%A9e%20%26%20100%25.
encodeURIComponent or encodeURI?
| Function | Encodes / ? & = # | When to use |
|---|---|---|
| encodeURIComponent | yes | a single parameter value or path segment |
| encodeURI | no | a whole URL that must keep its structure |
Example: encodeURI("https://example.com/search?q=crème brûlée") gives https://example.com/search?q=cr%C3%A8me%20br%C3%BBl%C3%A9e — slashes and the question mark stay. A value containing “&”, though, must go through encodeURIComponent, or it will be read as the start of another parameter.
Plus or %20?
HTML forms (application/x-www-form-urlencoded) often write spaces as “+”. When decoding, tick the option to turn pluses into spaces if the text comes from a form or a search engine URL.
Frequently asked questions
Why do I see %C3%A9 instead of “é” in a URL?
That’s “é” encoded (two UTF-8 bytes: C3 A9). Browsers often display the letter, but copying the address pastes the encoded form.
Does the tool show URL parameters?
Yes — paste a full URL with parameters (?a=1&b=2) and a decoded list appears below the result.