Parameter Value Encoder
A URL parameter is the part that may follow the "?" character of a URL.
URLs contain certain reserved characters. The ":" and "/" characters are examples.
URL parameters also contain reserved characters. Examples are the "?" character to separate the location part from the parameter part of the URL, the "=" character to delimit the name and its value, and the "&" character to delimit name/value sets.
There are many reserved characters. When reserved characters occur as part of a parameter name or value, the character needs to be encoded. Encoding is done with a hexadecimal number preceded with a "%" symbol.
There's an encoder further below to help you.
Here are some examples of what I'm talking about.
Spaces encode as %20. Thus, Will Bontrager
becomes Will%20Bontrager
.
Because "/" and "=" are reserved characters, any of those in a name or value need to be encoded. The name Dad/Son
becomes Dad%2FSon
. The value two=one company
becomes two%3Done%20company
.
With the above as examples, let's look at a complete (and unencoded) URL that incorporates them. (The properly-encoded URL is further below.)
http://example.com?Dad/Son=two=one company&name=Will Bontrager
That URL would be confusing to a browser. The name and values with special characters need to be encoded.
To do that, take each name and value with non-alphanumerical characters in the URL parameter and run them through the encoder separately. It will encode the characters that need to be encoded. Reincorporate the encoded version into the URL.
You'll end up with this.
http://example.com?Dad%2FSon=two%3Done%20company&name=Will%20Bontrager
The encoder was built because, first of all, I was writing a chapter of an upcoming book (about links to take a payer directly to the PayPal payment page with amount and other information pre-filled in).
Second, I needed to URL-encode part of a link (a link that expires at a certain date and time) to use as an example in the book. It was then I realized how very handy an encoder would be if it was always and immediately available.
So, here it is :)
In this box, type in the URL part to encode. Then click the "Encode" button. The box below the button will contain the URL-encoded content you typed here.
The above box contains the URL-encoded content when the "Encode" button is clicked.
Will Bontrager