HTML URL Encode

What’s a URL?

Uniform Resource Locator is what URL stands for. It is a website address. The words (javatpoint.com) or an Internet Protocol (IP) address (195.201.68.81) can be part of a URL. But most people use URLs with words instead of numbers because it’s easier to remember.

How to write a URL:

scheme:/prefix.domain:port/path/filename

Here,

  • The scheme is used to tell what kind of Internet service it is (most common is http or https).
  • the prefix is a  domain’s name is given by its prefix (default for http is www).
  • The domain is used to describe the name of an Internet site (like javaTpoint.com).
  • Port tells the host what port number to use (default for http is 80).
  • The path is used to tell the server what a path is (If omitted: the root directory of the site).
  • The name of a document or resource is set by its filename.

Here is a list of some of the most common URL schemes:

  • http: Common web pages that use the HyperText Transfer Protocol. Not a secret.
  • https (Secure HyperText Transfer Protocol):Secure web pages. Encrypted.
  • File Transfer Protocol, or ftp, is a way to download or upload files.
  • file: A file on your computer.

 

URL Encoding

URL encoding is used to turn non-ASCII characters into a format that can be used over the Internet, since a URL is only sent over the Internet using the ASCII character set. If a URL contains characters outside the ASCII set, the URL has to be converted.

  • In URL encoding, the non-ASCII characters are replaced with a “%” followed by hexadecimal digits.
  • URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign, or %20.

 

Following is a list of some character sets which are encoded by browser after submitting the text.

Character From Windows-1252 From UTF-8
%80 %E2%82%AC
£ %A3 %C2%A3
© %A9 %C2%A9
® %AE %C2%AE
À %C0 %C3%80
Á %C1 %C3%81
 %C2 %C3%82
à %C3 %C3%83
Ä %C4 %C3%84
Å %C5 %C3%85
People also search
Scroll to Top