Encode text to a percent-encoded URL string or decode it back — instantly, no signup required.
🔒 Runs in your browser — your text never leaves this page%20 — space%26 — &%3D — =%3F — ?%2F — /%3A — :%40 — @%23 — #URL encoding — also called percent-encoding — is the method defined in RFC 3986 for representing characters that aren't allowed, or that carry special meaning, inside a URL. Each such character is replaced by a percent sign (%) followed by two hex digits for its byte value: a space becomes %20, an ampersand %26, a hash %23. Since a URL may only contain a limited set of ASCII characters, anything outside it — spaces, reserved punctuation, accented letters, CJK characters, emoji — has to be encoded first, or browsers and servers will misread the path or break the query string.
The most common characters that require encoding, with their percent-encoded equivalents and where each one matters.
| Original | Encoded | Notes |
|---|---|---|
| hello world | hello%20world | Space → %20 (universal, not +) |
| & | %26 | Ampersand — separates query params; must be encoded inside a value |
| = | %3D | Equals sign — key=value separator in query strings |
| # | %23 | Hash — marks a fragment; browsers stop sending everything after it to the server |
| ? | %3F | Question mark — starts the query string; encode it when it appears in a value |
| @ | %40 | At sign — used in email addresses and authentication URIs |
| + | %2B | Plus — a literal plus must be encoded, since a bare + can be read as a space in query strings |
| ą ę ó (Polish) | %C4%85 %C4%99 %C3%B3 | Multi-byte UTF-8 characters each encode to two or more percent pairs |
| 😀 (emoji) | %F0%9F%98%80 | 4-byte UTF-8 character → four percent-encoded pairs |
| https://example.com/search?q=hello world&lang=pl | https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Dpl | Encoding a whole URL to nest it as one parameter value — note : and / get encoded too |
Use encodeURIComponent for a single piece of a URL — one query-parameter value, one path segment. It encodes everything except the unreserved set A–Z a–z 0–9 - _ . ! ~ * ' ( ), including / : ? # & =. Use encodeURI only on a complete, already-structured URL: it deliberately leaves / : ? # @ & = intact so it won't break the URL's own syntax. The practical rule: building a URL from parts → encodeURIComponent on each value; passing a full URL through untouched → encodeURI. This tool uses encodeURIComponent.
With encodeURIComponent, everything is encoded except the 11 unreserved characters A–Z a–z 0–9 - _ . ! ~ * ' ( ). That means reserved/structural characters (/ : ? # [ ] @ ! $ & ' ( ) * + , ; = — minus the few unreserved overlaps) are turned into %XX. Anything above ASCII 127 is first converted to its UTF-8 bytes, and each byte becomes its own percent pair, so a single accented or CJK character can expand to several %XX groups.
%20 is valid in every part of a URL and is the safe default everywhere. The + shorthand for a space is only defined inside the application/x-www-form-urlencoded body and query strings — not in the path. Because of that ambiguity, a literal plus sign in a value must itself be encoded as %2B, or a decoder may turn it back into a space. When constructing URLs by hand or calling an API, stick to %20.
Encode a query value whenever it might contain a character that has structural meaning in the query string — &, =, ?, #, +, a space, or any non-ASCII character. For example ?q=cats & dogs breaks at the &, because the parser reads dogs as a second parameter; encoded as ?q=cats%20%26%20dogs it stays a single value. Encode the value only — not the = joining key to value, and not the & separating one pair from the next.