Convert between plain text and URL-encoded format
URL encoding (also known as percent-encoding) converts characters into a format that can be transmitted safely over the internet. Reserved characters, unsafe ASCII characters, and non-ASCII characters are replaced with a "%" followed by two hexadecimal digits representing the character's UTF-8 byte value.
URLs can only contain a limited set of characters (letters, digits, and a few special characters). Spaces, Unicode characters, and symbols like &, ?, #, and % must be encoded to avoid breaking the URL structure or being misinterpreted by servers.
Reserved characters (&, ?, #, /, :, ;, =, @, $, +, %, etc.) and unsafe characters (spaces, quotes, <, >, etc.) are encoded. For example, a space becomes %20, and an ampersand (&) becomes %26. Non-ASCII characters like é are encoded as their UTF-8 byte sequences (e.g., %C3%A9).