URL Encode / Decode

Percent-encode text for URLs, or decode encoded query strings and path segments. Client-side only.

Mode

How URL Encode / Decode works

What gets encoded

Encoding works like JavaScript's encodeURIComponent: every character except letters, digits, and - _ . ! ~ * ' ( ) is replaced with % and its UTF-8 bytes in hex. A space becomes %20, & becomes %26, and € becomes %E2%82%AC.

This is the right encoding for a single value: a query parameter value or one path segment. It also encodes /, ?, =, and &, so do not run a whole URL through it. https://example.com/a?b=c would come out as one opaque string. Encode each value separately and then assemble the URL.

Decoding

Decoding turns %XX sequences back into characters, reading multi-byte sequences as UTF-8, so %C3%A9 becomes é. A + is decoded as a space, because HTML forms and many analytics and ad platforms encode spaces that way in query strings. If a value contains a literal plus sign, it should already be encoded as %2B.

An incomplete or invalid sequence, such as a lone % or %E2%82 without its last byte, produces an error rather than a partly decoded result. Text that has been encoded twice (%2520) needs decoding twice.

Example

The =, &, and / are encoded because this is meant for a single value, and € becomes its three UTF-8 bytes.

Text
q=price < 50 & in stock/€
Encoded
q%3Dprice%20%3C%2050%20%26%20in%20stock%2F%E2%82%AC

How to use URL Encode / Decode

  1. 1

    Choose Encode or Decode.

  2. 2

    Paste a value to encode, or an encoded string to decode.

  3. 3

    Check the output, or the error for invalid sequences.

  4. 4

    Copy the result into your URL, code, or spreadsheet.

When to use it

Building links

Encode search terms, redirect targets, or campaign values before putting them in a query string.

Reading logs and analytics

Decode URLs from server logs or analytics exports into readable text.

URL Encode / Decode questions

Should spaces be %20 or +?

Encoding produces %20, which is valid everywhere in a URL. + means space only in query strings from HTML forms; decoding accepts both.

Why are slashes encoded?

The tool encodes single components, where / would change the URL's meaning. Encode each path segment or value separately.

How do I read UTM parameters from a URL?

Paste the query string (everything after ?) and decode it to see the original campaign values.

Questions about privacy, file size, or accounts are answered on the FAQ page.

Other tools in the same category

Search all tools