About URL Encoding
Why encoding is needed
URLs can only contain a specific set of characters. Spaces, non-ASCII characters, and special symbols can break a link or change its meaning. Encoding makes any text safe for URLs.
RFC 3986 Standard
URL encoding is defined in RFC 3986. Allowed characters: A-Z, a-z, 0-9, hyphen (-), period (.), underscore (_), tilde (~). All other characters must be encoded.