Here’s an example of URL encoding from the article Forms and buttons: Sending data to the server:
Why URL encoding? Well, firstly, data items in the request is separated by and ampersand “&”. In the above example, the hidden data contains an ampersand. If this wasn’t encoded somehow then how can anyone know where the data item ends? So “&” becomes “%26″ (it’s ASCII value [numeric code representing the character] written in hexadecimal [a number system common on computers which uses 16 digits instead of the 10 digits used in binary])
Spaces are also a bit of a pain. For programmers writing code it’s hard to tell if something’s going wrong because of something which we can’t see. Imagine trying to fix a car engine where the spark plugs are invisible. What a pain. Far better to make them visible, right?
When the server deals with the data it just unencodes everything.
If you search for “url encoder” on google you’ll find plenty of tools like this one.