Skip to content
Advertisement

difference between %20 and %2 in url

The java application that I am developing right now is posting an url and some part of the url is like this:

asset=travel%2Ccar%2Chouse%2Cbusiness

is there any difference with %20 and %2 in the urls? I know that %20 means spaces but i am a little bit confused when I saw the %2.

Advertisement

Answer

The % indicates an escaped character. It’s a hexadecimal number that follows in the next two characters. In your example that is %2C, which is the hexadecimal number for the comma. Unescaped that becomes asset=travel,car,house,business

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement