Why a URL is full of things like %20 and %C3%A9, explained from first principles. This page is an explainer, not a tool.
Percent-encoding writes a byte that a URL cannot carry directly as a percent sign plus two hex digits. A space becomes %20, and the accented letter é becomes %C3%A9. It is also commonly called URL encoding; its formal name in RFC 3986 is Percent-Encoding.
A URL (URI) was designed for plain ASCII, and a set of its characters were given structural meaning. That creates three problems:
Percent-encoding is the single answer to all three: any character that is unsafe, or that you want to use as content, is written as %XX.
Most people assume one character maps to one %XX. There is a UTF-8 byte layer in between.
| Char | UTF-8 bytes (hex) | Percent-encoded |
|---|---|---|
| é | C3 A9 (2 bytes) | %C3%A9 |
| € | E2 82 AC (3 bytes) | %E2%82%AC |
| space | 20 (1 byte) | %20 |
| A | 41 (1 byte) | A (no encoding needed) |
| & | 26 (1 byte) | %26 |
Key idea: percent-encoding encodes bytes, not characters. That is why é becomes two %XX groups and € becomes three, while an ASCII letter stays exactly as it is.

RFC 3986 splits ASCII into three classes, and that is what decides whether a character can stay as-is in a URL.
| Class | Which characters | Encode? | Notes |
|---|---|---|---|
| Unreserved always safe |
A-Z a-z 0-9 - _ . ~ | Never encoded | Safe everywhere — they can appear exactly as they are. |
| Reserved structural |
:/?#[]@ !$&'()*+,;= | Depends | They carry structural meaning. Used as structure they stay as-is; used as ordinary content they must be encoded. |
| Other / unsafe | space, " < > \ ^ ` { } |, control characters, and everything non-ASCII (accented letters, emoji) | Always encoded | Illegal in a URL — always %XX. |
The single most important sentence: the same character is treated differently depending on where it sits. A ? that opens the query string is skeleton and stays; but if a parameter value genuinely needs to contain a question mark it must be written %3F, or it will be mistaken for the start of the query string.
This is where people most often get stuck — the rules are not uniform across the whole URL, they are per segment.
| Part | Example | Characters that may stay as-is |
|---|---|---|
| scheme | https: | letters, digits, + - . |
| host | example.com | letters, digits, - . ~ % and some sub-delims |
| path | /café/menu | unreserved + :@ and / (as a separator) + sub-delims |
| query | ?q=café&page=2 | unreserved + /?&= (as structure) + sub-delims |
| fragment | #section-3 | same as query, plus # itself |
So the correct approach is to encode part by part: encode the scheme, the host, each path segment, each parameter name and each parameter value separately, then join them with the structural characters — instead of throwing the whole URL at an encoder in one go (that encodes :// ? & too, and the URL breaks).

Turning https://example.com/café?q=café & tea into a legal URL.
original: https://example.com/café?q=café & tea
# split into parts, encode each one, keep the structural characters:
scheme https: → unchanged
host example.com → unchanged
path /café → /caf%C3%A9
param name q → unchanged
param value café & tea → caf%C3%A9%20%26%20tea
result: https://example.com/caf%C3%A9?q=caf%C3%A9%20%26%20teaNote that : // ? = all stay as they are; only the accented letters, the spaces and the ampersand in the content were encoded.

Dynamic text can contain characters that have structural meaning in a URL. If an ampersand from a search term is left raw inside a query value, a server may interpret the text after it as another parameter; spaces and non-ASCII text also need a representation the URI can carry. Encode the inserted value as its own component, then assemble it with the URL's real separators. Keep the original text until the receiving application has parsed the right component and decoded it. Percent-encoding is data formatting, not encryption or access control.
Use percent-encoding to represent bytes that cannot safely appear raw in a URI component, and to keep data characters from being mistaken for delimiters such as &, =, ?, or #. It also gives non-ASCII text a defined byte representation. The goal is to preserve the value while the URL is parsed—not to encode every character in the complete link. Leave the scheme, host, and intended path/query separators in place, and encode only the data component that needs it.
This page is an explainer with no requests and no uploads · a static page, ready to read.
See UTF-8 bytes turn into percent escapes, and learn why URL separators must stay intact.
Every tool on this site runs entirely in your browser. Pick the encoding problem you have: