Automate your affiliate marketing. Read our expert review of Dolphin Anty. Read Review

URL Decoder / Encoder

5 of 1 ratings

Type text on the left to get the URL-encoded version, or paste %XX codes on the right to get the text back. Everything is converted in your browser: nothing is uploaded.

Characters and their URL codes

A reserved character (# & + / : = ? @) keeps its meaning in an address, so when it is part of a value it must be encoded.

Character Code What it does
(space) %20 A space is %20 in an address and + in form data
" %22 A quote would end an HTML attribute
# %23 Starts the fragment, the part after #
% %25 Starts a code, so a real percent sign is %25
& %26 Separates the parameters of a query
+ %2B Means a space in form data, so a real plus is %2B
/ %2F Separates the parts of a path
: %3A Follows the scheme (https:) and comes before a port
= %3D Separates a parameter name from its value
? %3F Starts the query, the part after ?
@ %40 Comes before the host after a user name
< %3C Brackets of HTML: encode them in a value
> %3E Brackets of HTML: encode them in a value
é %C3%A9 Accented letters and Cyrillic take 2 bytes in UTF-8
я %D1%8F Accented letters and Cyrillic take 2 bytes in UTF-8
€ %E2%82%AC The euro sign and many symbols take 3 bytes
😀 %F0%9F%98%80 Emoji take 4 bytes

URL Decoder and Encoder Online: Percent-Encoding of Text and Addresses

Type or paste text on the left to get it URL-encoded on the right, or paste a string with %20 and other %XX codes on the right to read it as text. Both boxes follow each other as you type. Everything is converted in your browser: nothing you type is uploaded.

What is URL encoding

A URL can contain only a small set of characters: letters, digits and a few signs. Every other character, such as a space, a letter with an accent, a Cyrillic letter or an emoji, is written as one or more codes of the form %XX, where XX is the value of a byte in hex. This is called percent-encoding. A space is %20, the ampersand is %26, and the letter é is %C3%A9, which is the two bytes of its UTF-8 form. The table under the converter lists the characters you meet most often.

Which mode to use

  • A value (like the JavaScript function encodeURIComponent): use it for one piece of an address, such as the value of a query parameter or a path segment. It encodes the characters that have a meaning in an address, such as / ? # & =, so they cannot break the address.
  • A whole URL (like encodeURI): use it for a full address that contains spaces or non-English letters. It keeps : / ? # & = in place and keeps the %XX codes that are already in the text, so an address is not encoded twice.
  • Form data (like PHP urlencode or the browser when it sends a form): a space becomes + instead of %20.

Plus or %20 for a space

In the query part of an address and in form data a plus sign means a space, but in a path a plus is just a plus. When you decode, the option "read + as a space" is on by default, which is right for query strings. Turn it off for a path or for any text where the plus is a real plus. A real plus in a value is always %2B.

UTF-8 and other character encodings

Today almost every address uses UTF-8: a Cyrillic letter is two bytes and an emoji is four. Older sites may use another encoding, and then the same letters have other codes: "Привет" in Windows-1251 is %CF%F0%E8%E2%E5%F2, in KOI8-R it is %F0%D2%C9%D7%C5%D4. If a decoded text is full of strange signs, choose the right character encoding. The converter reads and writes UTF-8, Windows-1251, KOI8-R and Windows-1252 (Latin-1).

Broken and double-encoded text

A % that is not followed by two hex digits cannot be decoded. The converter keeps it as it is, decodes the rest, and tells you where the problem is. If the result still contains codes like %41, the text was probably encoded twice (a % was encoded as %25); the "Decode again" button decodes it once more.

Limitations

  • Only the characters that the chosen character encoding has can be encoded; others are reported.
  • The tool changes the characters, not the structure: it does not check whether the address is valid. To take an address apart, use the URL parser; to find addresses in a text, use the URL extractor.
  • Line breaks are encoded as %0A and %0D%0A, unless every line is processed on its own.

Similar tools

Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text online, instantly in your browser. UTF-8 and URL-safe Base64 supported.

16
Free Online URL Parser: Extract Link Components

Fast and free URL parsing tool by DIEG. Extract host, protocol, path, and query parameters instantly. Essential DevTool for webmasters and SEO experts.

10
URL and Email Extractor: Extract Links and E-mail Addresses from Text, HTML or a File

Extract all URLs and e-mail addresses from text, HTML, Markdown or a file. Remove duplicates, sort, list domains, leave out your own site. Free, in your browser, no upload.

7
Hex Converter

Hex converter online: hexadecimal to decimal, binary and text and back, any size, plus float to hex (IEEE 754, 32 and 64 bit). Works in your browser.

7

Popular tools