Your Ad Here
String Function
Execute String Function Online
String Functions Online Tool

URL Encoding / Decoding and Percent Encoding / Decoding

December 11th, 2009

The Uniform Resource Locator (URL) comprises several distinct parts. The Uniform Resource Name (URN), Uniform Resource Identifier (URI); and, in many cases, the appending of parameters or code elements. The traditional term for URL encoding is “Percent Encoding”, which is a less ambiguous description than URL encoding or URL decoding. There are other string functions which are also called URL encoding which involve the passing of parameters and arguments to a cgi parsing engine.


Percent encoding is simply the substitution of a hexadecimal value for a reserved symbol or character in a URL. This is necessary to prevent some programming languages from behaving erratically when a symbol in a URL string is misinterpreted as a command to the program. Usually the URL parser can decode string elements of a URL without problems; however, in order to maintain platform-independence, URLs use an encoded string according to industry standards. This is a critical component enabling uniform web programming language conventions.

Example of Percent Encoding

An example of percent encoding is a string function simple substitution of the reserved character ampersand (&) with its hexadecimal equivalent (26) by using a string to hexadecimal conversion function. The parser needs to know when an ASCII character is encoded to decode the hexadecimal to string. The character percent (%) was selected to be followed by a two digit hexadecimal value to indicate the character. Thus, the ampersand would be represented as “%26” in the URL. Another common reserved character is the question mark (?), represented as %2F in the string. String function online programs are plentiful which provide encoding and decoding hexadecimal text and symbols. The characters are entered and the program will execute the string function online.


Shorten a URL

Another string function that is mistakenly called URL encoding is the string conversion of a portion of the URL that serves one of two purposes. The URL can be significantly shortened as is demonstrated by the widely-known “TinyURL” URL encoding online application. A target URL is encoded and stored on the site and a much smaller, more readable URL is returned. The URL decoding online is handled by the parsing engine of the TinyURL servers and passed through to the internet to complete the connection.

RSA encryption

Another string function online tool is a simple form of RSA encryption using pairs of large prime numbers and modulo arithmetic to generate a string of hexadecimal digits. This is usually done to obfuscate parameters and arguments and prevent – or at least discourage – online user alterations. Another commonly used string function is Exclusive OR (XOR) masking of a known string with any other string to return an incomprehensible result. The decryption is simply taking the result and use the XOR with the known string to return the original unencrypted string.

For those needing additional information, there are many string function tutorials which describe strings and functions in exhausting detail. Entering the type of string function and its application into any well-known search engine will turn up a number of resources available to explain the specifics of any string functions.

VN:F [1.7.0_948]
Rating: +10 (from 10 votes)
Share and Enjoy:
  • Print
  • Add to favorites
  • Twitter
  • Facebook
  • Google Bookmarks
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Blogplay
  • RSS

One Response to “URL Encoding / Decoding and Percent Encoding / Decoding”

  1. useful tips says:

    I found this article once again. You have few useful tips for my school project. This time, I won’t forget to bookmark it. :)

    UN:F [1.7.0_948]
    Rating: +1 (from 1 vote)

Leave a Reply