1. Home
  2. Tools
  3. URL Encoder

URL Encoder

Do you find this helpful?

Use this online free URL Encode tool which takes a string and converts it to a URL-encoded format.

A URL (Uniform Resource Locator) is a resource address on the world wide web. URLs have a well-defined structure which was formulated in RFC 1738 by Tim Berners-Lee, the inventor of the worldwide web.

URL encoding, a mechanism for translating unprintable or special characters, converts to a universally accepted format by web servers and browsers. The encoding of information can be applied to Uniform Resource Names (URNs), Uniform Resource Identifiers (URIs) and Uniform Resource Locators (URLs), and selected characters in the URL are replaced by one or more character triplets comprised of the percent character and two hexadecimal digits. The hexadecimal digits in the character triplets represent the numerical value of the characters that are replaced. URL encoding is widely used in HTML form data submission in HTTP requests. URL encoding is also known as percent-encoding.

Allowed Characters in a URL.

The allowed characters in a URI are either reserved or unreserved (or a percent character as part of a percent-encoding). Reserved characters have special meaning, while unreserved characters have no such meaning. Using URL encoding, characters that otherwise would not be allowed are represented using allowed characters. The reserved and unreserved characters and the circumstances under which certain reserved characters have special meaning have changed slightly with each revision of specifications that govern URIs and URI schemes.

According to RFC 3986, the characters in a URL have to be taken from a defined set of unreserved and reserved ASCII characters. Any other characters are not allowed in a URL.

A URL contains parameters that include syntactic markers. If these markers are not encoded, the browser will parse them incorrectly.

URL encoding converts problematic characters, including whitespace.

URL parameter values include ASCII alphanumeric characters easily. Certain characters are “reserved,” and they have to be encoded to make sure that the server interprets the URL correctly. URL encoding should not be done anywhere except in parameter values. Characters are encoded by replacing it with a percent sign (%), followed by the appropriate two-digit hexadecimal string.

URLs only contain a limited set of characters from the US-ASCII character set including Alphabets (A-Z a-z), Digits (0-9), hyphen (-), underscore (_), tilde (~), and dot (.). Any character outside this allowed set is encoded using URL encoding or Percent encoding. All other characters, as well as non-printing characters and anything outside of 7-bit ASCII, should be encoded. Encoding of other characters can be even risky.

All values from 0 (%00) to 255 (%FF) can be URL-encoded so that binary data can be passed in a URL parameter. There is no need to encode every byte of binary data. It is more efficient to pass hex 41 as “A” rather than “%41”.

The URL Encode tool should be used only with single URL parameters. Providing a full URL will encode special characters, such as “?” and “=”, making them ordinary text not as a part of the standard URL syntax.

URL encoding adds to the URL’s length. There is no official limit on how long a URL can be, but many 2000 characters are considered to be the maximum safe length.