HTML URL Encode

HTML URL Encode

URL encoding is the process of converting characters into a format that can be transmitted over the internet. With the help of URL, web browser request pages. URL stands for Universal Resource Locater. The URL is the address of a website. http://www.tutorialscenterpoint.com is the example of URL. URLs consist of characters outside the ASCII set, the URL has to be changed into valid ASCII Format.

encodeURL(), rawurlencode(), URLEncode() are the library function of JavaScript, PHP and ASP respectively which are used to encode a string.

Use

  1. URL Encoding helps to replace the unsafe ASCII characters with a “%” followed by two(2) hexadecimal digits.
  2. Generally, URL Encoding replace a whitespace with a plus (+) sign or with %20.
  3. URL Encoding is used to convert theURL into valid ASCII format.

Example

          Before Encoding:   www.tutorialscenterpoint.com/ index/
          After Encoding:   www.tutorialscenterpoint.com%0d%0a