URL encoding (also known as percent encoding) is a mechanism for converting special characters into a format that can be safely transmitted in a URL. In a URL, certain characters have special meanings (such as ? & = # etc.) and need to be encoded to be transmitted as ordinary data. URL encoding converts characters to %XX format, where XX is the hexadecimal ASCII code of the character. For example, a space is encoded as %20, and non-ASCII characters are encoded as their corresponding UTF-8 byte sequences.