URL encode and decode

Percent-encode text so it's safe in a web address, decode codes like %20 back into text, and see every query string parameter in a table.

FreeNo sign-upRuns on your device

Loading the tool…

How to use it

  1. Choose Encode or Decode.
  2. When encoding, choose whether you have a single value or a whole URL.
  3. Paste your text. The result appears as you type.
  4. If there's a query string, read the parameters in the table underneath.

Value or whole URL

Web addresses can only contain a small set of characters. Anything else, like a space, an accent or an ampersand inside a value, is written as % followed by two hex digits for each UTF-8 byte. A space becomes %20 and é becomes %C3%A9.

Use value mode (encodeURIComponent) for one part of a URL, like a search term or a redirect address you put inside another URL. It encodes / ? & = and #, because inside a value they would break the URL. Use whole URL mode (encodeURI) when you have a full address with spaces or accents in it and want it to keep working. It leaves the characters that give a URL its structure alone.

Decoding and the plus sign

The decoder turns every %XX code back into text. It also reads + as a space, because HTML forms send spaces that way. If your text has a real plus sign, it will be encoded as %2B and decode correctly. A % that isn't followed by two hex digits is an error, and the tool tells you.

Reading query strings

Paste any link with a ? in it and the parameters appear in a table, decoded and in order. Repeated keys are kept, and empty values are marked. It is a quick way to check UTM tags on a marketing link, or to see what a long tracking link really contains.

The address before the ? and any fragment after # are shown above the table. If you are building a link by hand, encode each value on its own in value mode, then join them with & and =.

Privacy

Everything runs in your browser. The links you paste are not visited, sent or stored.

Questions

What does %20 mean in a URL?

It is a space. Spaces aren't allowed in URLs, so they are written as %20 (or + in form data).

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), so it's right for a single value. encodeURI leaves : / ? & = # alone so a full URL keeps working.

Why did decoding fail?

There is a % in the text that isn't followed by two hex digits, or the codes don't make valid UTF-8 text. Check each %XX code, or encode a lone % as %25.

Does this check if a link is safe?

No. It only reads the text of the link. It doesn't visit the page.