Developer

URL Encoder Decoder

Encode and decode URL components locally without sending data to a server.

URL component workspace
A browser address bar where special characters turn into percent codes and back, linked by a two-way arrow

How to use

  1. Paste text or a URL part into the input box.
  2. Click Encode to turn spaces, accents and symbols into percent codes, or Decode to turn percent codes back into readable text.
  3. Click Copy output to copy the result. If the input contains a broken percent code, the tool says so instead of guessing.

What URL encoding is

A URL may only contain a limited set of characters. Everything else, such as spaces, accented letters, emoji and characters that have a special meaning in a URL (& = ? # /), is written as % followed by two hexadecimal digits for each byte of its UTF-8 form. This is called percent-encoding.

This tool encodes a URL component, the way JavaScript's encodeURIComponent does: a single query value, a path segment or a parameter, not a whole address. That is why it also encodes / ? & = #; leaving them unencoded inside a value would change the meaning of the URL.

TextEncoded
Hello World!&a=bHello%20World!%26a%3Db
cafécaf%C3%A9
a/b?c=1#xa%2Fb%3Fc%3D1%23x
(space)%20

How to decode a URL

Paste the encoded text, such as a link copied from an email tracker or an address with %20 and %2F in it, and click Decode. Each %XX sequence is turned back into its character, and multi-byte sequences such as %C3%A9 become é.

If a value has been encoded twice (%2520 instead of %20), decode it twice. A % that is not followed by two valid hex digits, as in "100%", cannot be decoded and the tool shows an error.

Plus signs and spaces

In HTML form submissions (application/x-www-form-urlencoded) a space is sent as +. Percent-decoding leaves + as it is, so a+b stays a+b. If you are decoding form data, replace + with a space first, or encode real plus signs as %2B when you build the URL.

Frequently asked questions

What does %20 mean in a URL?

It is an encoded space. %20 is the hexadecimal code 20, which is the space character.

Should I encode the whole URL?

No. Encode each value you insert into a URL, such as a search term or a file name, and leave the https://, slashes and ? & = that structure the URL as they are.

Why does decoding fail?

The input has a % that is not followed by two hexadecimal digits, or a broken multi-byte sequence. Check for a cut-off link or a literal % sign.

Is my text sent anywhere?

No. Encoding and decoding run in your browser and nothing is uploaded.

Found a problem or have an idea? Report a problem

Share

You might also like