• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Percent-encoding and URL Encode/Decode

By Abhishek Ghosh October 4, 2013 6:42 am Updated on October 4, 2013

Percent-encoding and URL Encode/Decode

Advertisement

Percent-encoding or URL Encoding is a mechanism to provide information in an URL under certain circumstances to ensure only certain ASCII characters are used. This is important for Application, Plugin development, SEO Purposes and for the Webmasters. Unfortunately enough, this Percent-encoding or URL Encoding is given much lesser weight than it deserves. Actually the peoples who are around the backbone of Internet are very less in number and with the advent of consumer grade Blogs ‘Popular’ blogs on Internet, these information are never passed to the general consumer or prosumer grade Internet Users. Without this Percent-encoding or URL Encoding some information could not be expressed in a URL. For example, a space in the browser usually interpreted as the end of the URL, the next following signs are ignored or cause an error. When we share an URL, for example you Retweet this article, they are converted to Percent-encoded or URL Encoded form. You can try by clicking the Twitter button below this article and notice the full set on address bar – its not necessary to hit the Retweet button, just observe the set in the pop up window. That is what Percent-encoding or URL Encoding we are talking about.

 

Percent-encoding and URL Encode/Decode : Basics

 

With URL encoding a space can be passed by the string %20. RFC 3986 defines a standard as a URI (and therefore also a URL) should be constructed syntactically and under what conditions the URL encoding is applied. The character which are not included in the ASCII character set, for the sake of representation, in URL encoding the percent sign used. There is however so far only one recommendation in RFC 3986, a mandatory standard is still missing. It is important to note the two phrases – Uniform Resource Locator (URL) and Uniform Resource Identifier (URI).

URL Encoding in fact, generally  is more used within the main Uniform Resource Identifier (URI) set, which includes both Uniform Resource Locator (URL) and Uniform Resource Name (URN). As such, it is also used in the preparation of data of the application/x-www-form-urlencoded media type, as is often used in the submission of HTML form data or in HTTP requests. So, we need certain mechanism for the conversion. This is the basic principle behind Percent-encoding or URL Encoding.

Advertisement

---

 

Percent-encoding and URL Encode/Decode : Reserved and Non-reserved Characters

 

Percent-encoding and URL Encode-Decode

URLs can contain a maximum of the following fields:

Vim
1
http://username:passwd @ www.example.net:8080/index.html?action=something&session=A54C6FE2 # info

Certain characters identified within this expression and separate the various segments of the URL and allow disassembly and processing of expression. In a HTTP access, for example some processing like:

  1. Direction of the question mark (?) the data part ( query string ) of the URL
  2. Appending the equal sign (=) between the name of a parameter and its value
  3. Appending the ampersand (&) as delimiters between “parameter = value” elements in the data section
  4. Appending the hash (#) as the name of a document anchor (see also URI reference linked above)

are required.

Other characters have specific meanings in the document path . Altogether, the following characters are considered to be reserved:

Vim
1
! # $% & '() * +, /:; =? @ []

 

The following characters (groups) are not reserved, so have no predefined meaning in a URL:

 

Vim
1
Letters [AZ, az], numbers [0-9] and  - _. ~

 

However, the rules are not always strictly followed.

 

Percent-encoding and URL Encode/Decode : Tools

 

Now, coming to the practical part, the needed free tools for this percent-encoding and URL encode/decode work. PHP has own function :

 

Vim
1
http://php.net/manual/en/function.rawurlencode.php

 

This simply means, in WordPress or other CMS, we need not to depend on third party server, a plugin can make an URL suitable to be shared to Twitter (for example) by following the extra parameters needed to be added, thats why there is guide by Twitter :

 

Vim
1
https://dev.twitter.com/docs/auth/percent-encoding-parameters

 

But, these are actually never followed by the primarily Front End developers resulting in including too many Javascripts in the web pages. Here is a Command Line PHP based simple tool :

 

Vim
1
https://github.com/AbhishekGhosh/URLize

 

There are Java, Javascript, Ruby, Python, Apache Modules ways too.

Tagged With percent encoding , percent-encoding , url percent encoding , %IMAGEURL% , percent encode ampersand & , url to percent encoding dynamic parameter , online percent encode decode , long url percent encoding , interpreting percent encoding , how to url encode the percent sign in php

This Article Has Been Shared 469 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Percent-encoding and URL Encode/Decode

  • Internet Marketing Plan For 2012-13 with Google's Services

    Internet Marketing Plan For 2012-13 emphasizes on how the Google’s Various Free and Paid Services can be properly used to make your monetization smooth.

  • Schema.org Optimized WordPress Posts, Categories for Genesis

    Schema.org Optimized WordPress Posts, Categories for Genesis Theme Frameworks are easier to create than to fully work on making WordPress modern from scratch. Easier does not mean that you can create within one day. It might take few months, but the good work Genesis Theme Framework is still continuing is the addition of the microformats other […]

  • Object Meta Tags for Facebook Open Graph Protocol

    Object Meta Tags for Facebook Open Graph Protocol are represented by HTML markup on a particular webpage which uniquely defines each object. Here are standards. There are three parts – Creating Objects, Reading Objects and Updating Objects. We can implement Open Graph Object Meta Tags with widely known Pointers.   Object Meta Tags for Facebook […]

  • Increasing Twitter Followers : Marketing Not Purchasing

    Increasing Twitter Followers never means you have to buy something – real followers will only remain if you have real interaction and some good marketing service.

  • How To Use Any Web Font From Own Hosted Library

    How to use any web font from own hosted library describes the ways any web font can be used from either CDN or Server. This guide has good potential for F/OSS.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023
  • What is Vehicular Ad-Hoc Network? January 24, 2023
  • Difference Between Panel Light, COB Light, Track Light January 21, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Percent-encoding and URL Encode/Decode," in The Customize Windows, October 4, 2013, January 29, 2023, https://thecustomizewindows.com/2013/10/percent-encoding-and-url-encodedecode/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT