URL Encoder & Decoder

Percent-encode and decode text and URLs. It copes with broken input, spots double encoding, and breaks a URL into its parts and decoded query parameters. Everything runs in your browser.

  • Decodes what it can
  • Spots double encoding
  • Shows the parts of a URL

Direction

Treat the text as

One value escapes everything except letters, digits and - _ . ~ ! * ' ( ): use it for a single query value or path segment.

Result

The result appears here.

What percent-encoding does

URLs can only carry a limited set of characters. Anything else, such as a space, an accented letter or an emoji, is written as a percent sign followed by the hexadecimal value of each of its UTF-8 bytes. A space becomes %20 and é becomes %C3%A9. Decoding turns those sequences back into the original text.

One value or a whole URL

The most common mistake is using the wrong scope. Encoding one value is for a single piece, such as a search term that goes after q=. It escapes every character that could be mistaken for structure, including ? & = / and #, so a term like "fish & chips" cannot break your query string. Encoding a whole URL is for a complete address that is already structured. It leaves : / ? # & = alone and only fixes spaces and non-ASCII characters.

If you encode a complete URL as one value you get https%3A%2F%2Fexample.com..., which is correct only when that URL is itself a parameter of another URL, such as a redirect target.

Spaces: %20 or +

In a URL path, a space is always %20. In the query part of an HTML form submission, a space is traditionally written as +, and a real plus sign is written %2B. Many servers accept both in query strings, but only %20 is safe everywhere, which is why it is the default here. Switch on the plus options when you are working with form data.

Broken and double-encoded text

Real-world text is often not clean. A stray % in the middle of a sentence, or bytes from an older Latin-1 system, make a strict decoder fail on the whole string. This tool decodes everything it can, leaves the rest exactly as written, and lists each problem with its position so you can see what to fix. If the result still contains percent sequences, the text was probably encoded twice, and you can decode it again with one click.

Reading a URL

When your text is an address, the tool also breaks it into scheme, host, port, path and fragment, and lists each query parameter with its value decoded. That is the quickest way to see what a long tracking link actually contains.

Frequently asked questions

What is percent-encoding?

It replaces characters that are not safe in a URL with a percent sign and the two hexadecimal digits of each UTF-8 byte. A space becomes %20, and é becomes %C3%A9.

What is the difference between "one value" and "a whole URL"?

One value escapes every character that could be mistaken for URL structure, including ? & = / and #, so use it for a single query value or path segment. A whole URL keeps those structural characters and only escapes spaces and non-ASCII characters. Encoding a complete URL as one value is the classic mistake that breaks a link.

Should a space be %20 or +?

%20 works everywhere. A + means a space only in HTML form data. This tool writes %20 unless you tick "Write spaces as +", and when decoding it leaves + as a plus unless you tick "Read + as a space".

Why were parts of my text left as written when decoding?

A stray % that is not followed by two hex digits, or bytes that are not valid UTF-8, cannot be decoded. The tool decodes everything else and lists each part it left alone with its position. Bytes like %E9 usually come from an older system that used Latin-1.

What is double encoding?

It happens when already-encoded text is encoded again, so %20 becomes %2520. If the decoded result still contains percent sequences, the tool tells you and offers to decode it once more.

Which characters are never encoded?

Letters, digits and - _ . ~ are always left alone. Encoding one value also leaves ! * ' ( ) as they are, unless you tick the option to escape them too.

Is my text uploaded?

No. Encoding and decoding happen in your browser.

More tools like this

All tools →