URL Encoder / Decoder

Percent-encode or decode text and URLs, see each part of a URL, and find broken %XX sequences.

Runs in your browser. Nothing is uploaded.

Updated

Your textProcessed in your browser
Your text stays on this device. No upload required.

How to use URL Encoder / Decoder

  1. Choose Encode or Decode and paste the text or URL.
  2. Pick whether it is a value, a whole URL or form data.
  3. Copy the result; full URLs are also split into parts.

URL Encoder / Decoder at a glance

Typical use: Decode a tracking link to read its parameters, or encode a value for a query string.

Runs in your browser; nothing is uploaded. Matches JavaScript’s encodeURIComponent and Python’s urllib.

When to use URL Encoder / Decoder

Put a value with spaces, accents or symbols into a query string; read a long tracking or redirect link whose parameters are full of %20 and %3D; or find out why a link breaks because of a stray % sign.

Which mode to use

  • A value or part of a URL: everything that isn’t a letter, digit or one of - _ . ! ~ * ' ( ) is encoded, including / ? & and =. Use it for a single query value or path segment.
  • A whole URL: keeps the characters that give a URL its structure (: / ? # & =) and encodes the rest, such as spaces and accents. %XX already in the URL is left alone, so nothing is encoded twice.
  • Form data: as browsers send HTML forms: spaces become +, and + in the text becomes %2B.

URL Encoder / Decoder example

café & crème = 5€
value:  caf%C3%A9%20%26%20cr%C3%A8me%20%3D%205%E2%82%AC
form:   caf%C3%A9+%26+cr%C3%A8me+%3D+5%E2%82%AC

Prefer the terminal?

The same encoding in Python:

python3 -c "import urllib.parse as u; print(u.quote('café & crème', safe=''))"
python3 -c "import urllib.parse as u; print(u.unquote('caf%C3%A9'))"

quote() keeps / unencoded unless you pass safe=''. In JavaScript, encodeURIComponent() gives the same result as this page’s “value” mode.

References

Frequently asked questions

What is URL encoding?

URLs can only contain a small set of characters. Others are written as % followed by the two-digit hex code of each UTF-8 byte: a space is %20 and é is %C3%A9. This is also called percent-encoding.

Should a space be %20 or +?

In a URL path, always %20. In a query string sent by an HTML form, + is used for spaces. Servers usually accept %20 in query strings too, so %20 is the safer choice when you build a link yourself.

What does “broken sequence” mean?

A % that isn’t followed by two hex digits (such as “50% off”), or bytes that don’t form a valid UTF-8 character (such as %E4 alone). The page shows where each problem is; write a literal % as %25.

Is anything sent to a server?

No. Encoding and decoding happen in your browser.