URL encoding converts characters into a format that can be transmitted over the Internet. URLs can only be sent over the Internet using the ASCII character-set.
Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format. URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits.
URL decoding is the process of converting URL encoded text back to its original form. It reverses the encoding process, replacing "%xx" sequences with their corresponding characters.
This is useful when you need to read or process data that has been URL encoded, such as form submissions or query parameters.