Why URLs Need Encoding
RFC 3986 defines URLs as sequences of characters from a limited set: letters, digits, and a handful of special characters (-._~). Everything else — spaces, ampersands, non-ASCII characters, equals signs — must be percent-encoded. A space becomes %20, an ampersand becomes %26, and the Korean character “한” becomes %ED%95%9C (3 UTF-8 bytes, 9 characters encoded). Without encoding, a URL like ?q=rock&rollis ambiguous: is “roll” a separate parameter or part of the value?