URL's with percent signs??? Why?

Sometimes I'll copy a URL and it will contain percent signs and numbers.  Other times it won't  Why is this?
Who is Participating?
Jeff DarlingDeveloper AnalystCommented:
The percent signs and numbers are url encoded strings.

URL Encoding replaces unsafe characters with % followed by their hex equivalent. That hex equivalent is the HEX value for the character being replaced.
Tom BeckCommented:
Detailed explanations all over the internet like this one. Includes a list of encoded characters:

Mark BullockQA Engineer IIICommented:
This encodes characters in the URL as number. Often these are reserved characters.
For example, let's say I wanted to pass a query parameter, answer, with a value of "a&b".
Your URL might look like:
Things would be confusing because the ampersand character has a special meaning (it separates two query parameters). So there are two query parameters in your URL: answer and b.
But you intended to send one query parameter.

So you URL encode the value to avoid this.
Jason C. LevineNo oneCommented:
Another common example:


%20 is a space:

http://domain.com/this is a bad idea.html
Dave BaldwinFixer of ProblemsCommented:
I like the explanation on this page: http://en.wikipedia.org/wiki/Percent-encoding
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.