URL Encoder/Decoder Tool

Enter the text that you wish to encode or decode:



About URL Encoder/Decoder Tool

URLs and URIs are designed to locate or identify resources available over the internet, anything that definitely identifies a resource is its URI, such as id, name, or ISBN number. A URL specifies the location of a resource and its access protocol. All URLs are URIs, but not all URIs are URLs.

A URL (Uniform Resource Locator) is the location of a resource in the world wide web. Web browsers request pages from web servers by using a URL. The URL is the address of a web page, like: https://www.seocentraltools.com.

Every URL protocol confirms to a generic syntax which looks like this -

scheme:[//[user:password@]host[:port]]path[?query][#fragment]


URL Encoding (Percent Encoding)

URLs can only be sent over the Internet using the ASCII character-set. These characters include digits (0-9), letters(A-Z, a-z), and a few special characters ("-", ".", "_", "~").

URLs often contain characters outside the ASCII character-set. Example (backspace, vertical tab, horizontal tab, line feed etc), including unsafe characters like space, \, <, >, {, }, and also reserved characters like ?, /, #, : etc. Any data transmitted as part of the URL, whether in query string or path segment, must not contain any of these characters. URL containing any of these characters has to be converted into a valid ASCII format to be sent to the internet.

So, to transmit any data in the URL that contain these disallowed characters, we need to encode them. URL Encoding is the process of converting characters into a format that is universally accepted and understood by all web browsers and servers. It first converts the character to one or more bytes. Then each byte is represented by two hexadecimal digits preceded by a percent sign (%) - (e.g. %xy). The percent sign is used as an escape character. URLs also cannot contain spaces. URL encoding replaces a space with a plus (+) sign or with %20.

URL encoding is also known as Percent encoding since it uses percent sign (%) as an escape character.

You can ehcek more on W3Schools on URL Encoding.


When to Encode URLs

URLs need to be encoded when any of the below occurs

1. When accepting an input that may have spaces.

    encodeURI("http://www.mysite.com/a file with spaces.html")
             //http://www.mysite.com/a%20file%20with%20spaces.html

2. When building a URL from query string parameters.

     let param = encodeURIComponent('mango')
     let url = "http://mysite.com/?search=" + param + "&length=99"; //http://mysite.com/?search=mango&length=99

3. When accepting query parameters that may have reserved characters.

   let params = encodeURIComponent('mango & pineapple')
   let url = "http://mysite.com/?search=" + params; //http://mysite.com/?search=mango%20%26%20pineapple

 

JavaScript DecodeURI/EncodeURI

In JavaScript, we have two special functions to serve these tasks of encoding and decoding the URIs. encodeURI() and decodeURI() these functions are introduced to encode/decode non-English characters, such as Latin, Greek letters used in URI (Uniform Resource Identifier). Also, it is helpful to encode special characters, replace whitespaces in URI; sometimes these special characters or whitespaces can delimit the URI.

1. EncodeURI():  It is used to encode a given URI into UTF-8 format. The encodeURI() function takes URI (of type string) as a function parameter value and encodes a URI by replacing each instance of certain characters with one, two, three, or four escape sequences representing the UTF-8 encoding of the character.

Syntax: encodeURI(URI)

The encodeURI() method does not encode characters like , / ? : @ & = + $ * #

Use the encodeURI() method to encode a URI

Example to Encoded this URI: my%20test.asp?name=st%C3%A5le&car=saab

Decoded URI is: my test.asp?name=ståle&car=saab


2. DecodeURI():  It is used to decode already previously encoded URI. This works in reverse, taking an encoded string and replacing the tokens with the normal characters. The decodeURI() function takes encodedURI (of type string) as a function parameter value and decodes a given encoded-URI, previously created by encodeURI() or by a similar routine.

Syntax: decodeURI(encodedURI)

For example, If Decoded URL is "?qry=M & L", the Encoded URL is "%22%3Fqry%3DM+%26+L%22"


So basically it works in reverse. The encoded URL is the reverse of decoded URL


URL Encoder/Decoder Tool

To decode or encode a URI or URL as the case may be, you can use any URL encoder and decoder tool from SEOCentralTools.com. SEOCentralTools URL Encoder and Decoder tool is a free SEO tool that helps convert encoded URL string into valid ASCII format that is universally accepted and understood by all web browsers and servers.. The URL Encoder / Decoder is part of our robust 100% free online SEO tools.

All you need to do is follow the steps below for a quick encode/decode:

1. Visit SEOCentralTools.com and go to the URL Encoder/Decoder Tool Page.
2. Enter add any string or URL into the tool and press the Check button.
3. SEOCentralTools will encode or decode the string of URL.

This is what you will see if the website is up:

 

 

The tool will encode or decode the URL into a format that is usable on the internet.

 


Input a string of text and encode or decode it as you like. Handy for turning encoded JavaScript URLs from complete gibberish into readable gibberish.

 

We do recommend a 100% free online SEO analysis tool that offers complete access to the best-in-class proprietary metrics including PageSpeed Insights, Traffic rank, Keyword consistency, Text/HTML Ratio, Keyword Difficulty, Link analysis and more. Uncover technical SEO issues on your website wth this tool and get a get a fully custom, beautiful PDF reports with recommended improvements and fixes.