Why is URL encoding important?
URL encoding is vital because otherwise the content of the URL could be interpreted incorrectly by the web server. You mainly use URL encoding to create coded content of variables.
By encoding the content of a variable, it can be safely passed on by the URL to another page on the server. An example of URL encoding could be that the space between two words is replaced by %20, so the server knows that if %20 is written in the URL the encoding should be read as a space.