URL Encoding

(Some links on this page take you to details in the HTML Tag Reference. Bookmark this page in your Favorites so you can come back to it later.) See also JavaScript escape vs. encode for details on encodeURI, escape and encodeURIComponent.

A number of characters are considered unsafe to use in a URL because they have special meanings in URLs for various reasons1.

Any attribute with a value that is a URL must be URL-encoded, including:

In addition, when a <form> specifies method="GET", the user input returned in the query string will be URL-encoded.