URLs can only contain a limited set of safe ASCII characters. Spaces and special chars must be encoded.
Each unsafe character is converted to its UTF-8 byte sequence, then each byte is expressed as %HH (two hex digits).
A space becomes %20, an ampersand becomes %26, a question mark becomes %3F.
This tool uses encodeURIComponent() which encodes everything except: A-Z a-z 0-9 - _ . ! ~ * ' ( )