Make text safe for a URL, or read an encoded one.
Reserved characters in a URL, such as spaces, ampersands and question marks, are replaced by a percent sign and two hexadecimal digits of their UTF-8 bytes. Component mode encodes everything except letters, digits and a handful of safe marks, which is right for a single query value. Whole URL mode keeps characters that give a URL its structure, such as the slash, colon and question mark. Form mode uses a plus sign for spaces, as HTML forms do.
Decoding reverses each of these and tells you if there is a malformed percent sequence.
Component encoding escapes characters like the slash and the ampersand, so use it for a value inside a query string. Whole URL mode leaves them alone so that the address keeps working.
The plus form comes from HTML form submissions. In a URL path, only %20 is correct.
As their UTF-8 bytes, each byte written as a percent sequence. The letter e with an acute accent becomes %C3%A9.