Can we use & in url?

Yes, you can use it plain in your URL path like this:

http://example.com/Alice&Bob

Only if you want to use it in the query you need to encode it with %26:

http://example.com/?arg=Alice%26Bob

Otherwise it would be interpreted as argument separator when interpreted as application/x-www-form-urlencoded.

See RFC 3986 for more details.

Leave a Comment