Percent-encode and decode URL components.
URL encoding (percent-encoding) replaces unsafe characters in a URL with a % followed by hex digits, so query strings and parameters transmit correctly. Use Encode before putting text into a URL, and Decode to read an encoded URL. Runs entirely in your browser.
Whenever you put user text, spaces or special characters into a query string or path so the URL stays valid.
URL encoding keeps text readable and only escapes unsafe characters; Base64 turns everything into an ASCII blob. They solve different problems.