Skip to main content
ToolNestora

URL Encoder and Decoder

Encode text so it can be used safely inside a web address, or decode percent-encoded text such as %20 and %C3%A9 back into readable characters. Choose whether you are working with a piece of a URL (a query value or path segment) or a whole address, and process a list one line at a time if you need to.

Encode or decode a URL

What do you want to do?
Treat the input as

Encodes or decodes every special character, including / ? & = # and :. Use this for a query value or path segment.

Handy for a list of values. Otherwise line breaks are encoded as %0A.

How to use it

  1. Choose encode or decode

    Encode turns special characters into %-sequences. Decode turns them back.

  2. Say what the input is

    “A piece of a URL” converts every special character, which is right for a query value. “A whole URL” leaves the characters that structure an address, such as / ? & = and #, alone.

  3. Set the options

    Process each line separately for a list. When decoding, tick “Treat + as a space” for text from HTML forms or query strings.

  4. Copy the result

    Copy or download it, or use it as the next input and switch direction to check a round trip.

Example: putting a search phrase in a link

To link to a search for “fish & chips” you cannot write the & directly, because it would start a new parameter. Choose Encode with “A piece of a URL” and the phrase becomes fish%20%26%20chips, which you can place after q= in the address.

Characters that are changed

Letters, digits and - _ . ! ~ * ' ( ) are never changed. Common characters that are, and how they are written:

Examples of percent-encoded characters
CharacterEncodedNotes
Space%20In form data a space is often written as + instead.
&%26Separates query parameters, so encode it inside a value.
=%3DSeparates a name from its value.
?%3FStarts the query string.
/%2FSeparates path segments.
#%23Starts the fragment.
+%2BMeans a space in form data, so a real plus must be encoded.
%%25The escape character itself.
é%C3%A9Non-ASCII characters are encoded as their UTF-8 bytes.

Limits and limitations

  • Text is encoded as UTF-8, the standard for web addresses. Percent-encoded text that uses another character set, such as an old Latin-1 form, cannot be decoded as text and is reported as an error.
  • Whole-URL mode does not parse or validate the address. It only decides which characters to leave alone.
  • The ! ' ( ) and * characters are not encoded because browsers' standard encoder leaves them alone; they are allowed in most places but a few strict systems expect them encoded.
  • Decoding treats a + as a space only when you tick the option.

Frequently asked questions

What is the difference between encoding a piece and a whole URL?

Encoding a piece converts everything special, so https://example.com/a?b=c becomes https%3A%2F%2Fexample.com%2Fa%3Fb%3Dc. Encoding a whole URL leaves the structure characters alone and only changes things like spaces and non-English letters, so the address still works.

Why does decoding report an error?

A % must be followed by exactly two hexadecimal digits, and the bytes must form valid UTF-8 text. A stray % (for example in “100%”) or a cut-off sequence causes an error. The message says where the problem is.

Is + a space or a plus?

In the query part of a URL produced by an HTML form, + means a space. Elsewhere it is a plus sign. Tick “Treat + as a space” only when decoding form-style text.

Is my text uploaded?

No. Your text is processed by JavaScript running in your browser and is not sent to a server. The page itself still loads from a web server like any website. This site can load advertising or analytics scripts, but only after you accept them in the cookie notice. They are separate from the tools, which never pass the files or text you work with to them.