URL Encoder

URL Encoder

Character Encoding

  • Every character can be represented in HTML in two ways: an "HTML-encoded" format, and a"URL (or escape)-encoded" format
  • There are several ways to specify which character encoding is used in the web page
  • The web server can include the character encoding or "charset" in the HTTP Content-Type header
  • A numeric character reference refers to a character by its Universal Character Set/Unicode code point, and uses the format &#nnnn; for decimal notation or &#xhhhh;  for hexadecimal

HTML Encoding

  • Characters are displayed by using  HTML control characters
  • The format consists of the two characters &#, the ASCII value of the character, and the character
  • The word 'hello' would be HTML-encoded as hello

URL Encoding

  • Used to transmit URLs, queries, etc. over the HTTP protocol
  • Converts each character to its hexadecimal equivalent, and precedes it with a %
  • The word 'hello' would be URL-encoded as %68%65%6C%6C%6F

Encoding White Space

  • A white space is normally converted to %20 for URL Encoding
  • Form data in URLs is in a modified form that uses + for spaces
  • You may see + in URLs in the query string after a ?

URL Encoder