Software, your way.
burger menu icon
WillMaster

WillMasterBlog > Development

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

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

Was this blog post helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method


All information in WillMaster Blog articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

Recent Articles in the Library

Linked Images in Facebook

Post a URL on Facebook. Facebook pulls in an image and links to that URL. (Probably similar on other social media sites.)

Real Download Link

A download link can tell the browser to download the file for saving on the user's hard drive — instead of displaying it in a browser window.

Characters for Hyphenation

The CSS hyphenate-character property can be used to tell the browser an alternate character or set of characters should be used where a hyphen would be inserted at end of lines.

Automatic Wrap Balancing for Headlines

Use the CSS text-wrap:balance; property to better balance the line lengths of multi-line headlines.

Redirect With Method POST

When you can't use method POST, but you must, read this.

Gradient-colored Text

The information you need to make color-gradient text.

The HTML Q Tag

Create a style then use the HTML q tag to apply the style. This is about as easy as it gets for attracting attention to quotes.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2025 Will Bontrager Software LLC