URL encode and decode

Data to encode

Data to decode

This tool allows you to encode URL component and decode URL component.

User guide

Copy and paste, drag and drop a text file, browse a text file (Click on "Browse file" button) or directly type in the editors above, and it will be automatically converted, and editors will be updated with encoded / decoded data :

  • If you want encode URI component, fill the "Data to encode" editor above.
  • If you want decode URI component, fill the "Data to decode" editor above.

You can copy the result to the clipboard (click on "Copy to clipboard" button) or download it to a file (Click on "Download file" button).

Online URL encoding tool

This online tool allows you to easily and quickly encode and decode a url. It avoids having to write a few lines of code to get the result.

This tool uses the javascript functions encodeURIComponent and decodeURIComponent.


A Uniform Resource Locator (URL) is a reference to a web resource, it is a web address. Browsers request web pages by using an URL. It is specific type of Uniform Resource Identifier (URI).

A URL contains a protocol (http, ftp, ...), a hostname (extendsclass.com), and a file name (url-encode.html).

URLs reference web pages (example: https://extendsclass.com), but reference also file transfer (ftp), email (mailto), ...

URL Encoding

URL encoding (Percent Encoding) is a mechanism for converting URLS into a format that can be transmitted over the Internet.

It converts the characters into a bytes using the UTF-8 encoding, and it replaces unsafe ASCII characters with a "%" character followed by two hexadecimal digits. The two hexadecimal digits represent the numeric value of the unsafe character.

There are reserved characters, with special meaning, and they must be encoded.
Sample: / is a reserved character, it is used for path component of a URI. / is converted to %2F.

You can report a bug or give feedback by adding a comment (below) or by clicking "Contact me" link (at the top right hand corner of the page).