Why it exists
A URL can only contain a limited set of characters. Spaces, accents and symbols such as & and ? have to be written as percent codes so they are not mistaken for structure.
How it works
Each unsafe character is converted to UTF-8 bytes, and every byte is written as % plus two hex digits. “café au lait” becomes caf%C3%A9%20au%20lait.
Two scopes
Encoding a whole address leaves characters like : / ? & alone, while encoding a single value escapes them too. The URL Encoder/Decoder offers both. See component vs full encoding.
Common misunderstanding
Encoding twice turns %20 into %2520 and breaks links. Also, a plus sign means a space only in form-style query strings, not everywhere. Read how to URL encode and decode for more.