Character Entities in URL Encoding
by Geethalakshmi[ Edit ] 2011-06-22 16:01:38
Character Entities in URL Encoding
Character Entities that should be encoded in URL's:
Character | Purpose in URL | Encoding |
: | Separate protocol (http) from address | %3B |
/ | Separate domain and directories | %2F |
# | Separate anchors | %23 |
? | Separate query string | %3F |
& | Separate query elements | %24 |
@ | Separate username and password from domain | %40 |
% | Indicates an encoded character | %25 |
+ | Indicates a space | %2B |
<Space> | Not recommended in URLs | %20 or + |
Character Entities that should not be encoded in URL's:
Character | Purpose in URL | Encoding |
; | Invalid in URLs | %3B |
= | Invalid in URLs | $3D |
$ | Invalid in URLs | %26 |
, | Invalid in URLs | %2C |
< | Invalid in URLs | %3C |
> | Invalid in URLs | %3E |
~ | Invalid in URLs | %25 |
^ | Invalid in URLs | %5E |
` | Invalid in URLs | %60 |
/ | Invalid in URLs | %5C |
[ | Invalid in URLs | %5B |
] | Invalid in URLs | %5D |
{ | Invalid in URLs | %7B |
} | Invalid in URLs | %7D |
| | Invalid in URLs | %7C |
" | Invalid in URLs | %22 |