Skip to content

Encode and Decode URLs

Percent-encode text for a URL, or decode an encoded string back into readable text. Reports malformed input rather than guessing.

Runs entirely in your browser — nothing is uploaded

What percent encoding is for

A URL can only carry a restricted set of characters. Everything else — spaces, ampersands, accents, anything non-Latin — has to be written as a percent sign followed by the hexadecimal value of its bytes.

A space becomes %20. An ampersand becomes %26, which matters because an unencoded ampersand ends the parameter and starts a new one, quietly truncating whatever came after it.

The plus sign is ambiguous

In a query string, + historically means a space. In the rest of a URL it means a literal plus. The same character, two meanings, depending on where it appears.

This decoder treats + as a space, which is right for the query strings people almost always paste in. If you are decoding a path segment containing a genuine plus, encode it as %2B first.

Malformed input is refused

A stray percent sign not followed by two hex digits is not decodable, and a decoder that swallows it and returns something is hiding a truncated or corrupted string from you.

This says what is wrong instead, which is usually the more useful answer — it means the URL you copied was cut off.

Nothing is sent anywhere

Everything on this page happens in your own browser. No request is made, nothing is stored between visits, and the page keeps working with the connection switched off.

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves the structural characters of a URL alone so a whole address survives. encodeURIComponent encodes them too, which is what you want for a single parameter value. This tool does the second, because encoding one value is the common task.

Why did my link break in an email?

Usually an unencoded ampersand or space. Mail clients frequently stop the link at the first space, which is why encoding before sending is worth the extra step.

Does this handle accents and other alphabets?

Yes. They are encoded as their UTF-8 bytes, so a single accented character becomes two or three percent-escapes. That is correct and expected.

Is anything sent anywhere?

No. The text stays in this tab.