URL encoder / decoder

Percent-encode a query parameter or a full URL, or decode %20-style escapes back to text. Follows encodeURIComponent, encodeURI and decodeURIComponent rules.

Processed locally in your browser
Loading tool…

About URL encoder / decoder

The URL encoder and decoder converts text to and from percent-encoding, the %XX format used in URLs. It offers three modes: Encode component for a single query value or path segment, Encode full URL for a complete address, and Decode to turn escaped text back into readable characters.

The modes follow JavaScript’s encodeURIComponent, encodeURI and decodeURIComponent, so results match what your front-end code produces. Non-ASCII characters are encoded as UTF-8, and when decoding, a + is read as a space, as in HTML form submissions. Malformed sequences are reported instead of being passed through.

How to use URL encoder / decoder

  1. Choose Encode component, Encode full URL or Decode.
  2. Paste the text, parameter value or URL into the input box.
  3. Read the result in the output box as you type.
  4. Copy the result or download it as a .txt file.

Features

  • Encode component escapes everything except letters, digits and - _ . ! ~ * ' ( ).
  • Encode full URL leaves characters with a structural meaning, such as : / ? # & and =, unescaped.
  • Decode converts %XX sequences to characters and + to spaces.
  • Encodes non-ASCII characters and emoji as UTF-8 byte sequences.
  • Reports malformed input, such as a % not followed by two hex digits.

Common uses

  • Encoding a search term, email address or redirect URL for use as a query parameter.
  • Reading an encoded callback or redirect_uri value in OAuth requests or logs.
  • Fixing links that contain spaces or non-English characters.
  • Debugging double-encoded URLs where %20 has become %2520.

Frequently asked questions

What is the difference between Encode component and Encode full URL?

Encode component (encodeURIComponent) escapes reserved characters such as / ? & = and #, so the result is safe as a single parameter value. Encode full URL (encodeURI) leaves them alone so the URL’s structure keeps working. Use component mode for values and full mode only for whole URLs.

Should a space be encoded as %20 or +?

In paths and most APIs a space is %20, which is what this tool produces. The + form comes from HTML form encoding (application/x-www-form-urlencoded) in query strings. When decoding, this tool treats + as a space, so a literal plus sign must be written as %2B.

Why do I see %2520 in a URL?

The text was encoded twice. The first pass turned a space into %20, and the second encoded the % sign as %25. Decode the value repeatedly until it stops changing, then encode it once.

What does “Malformed percent-encoding” mean?

The input contains a % that is not followed by two hexadecimal digits, or a sequence that is not valid UTF-8, such as %E9 on its own. Encode a literal percent sign as %25, and check that multi-byte characters were not cut off.

Does Encode full URL make any URL valid?

It escapes spaces, non-ASCII characters and a few unsafe symbols, but it assumes the URL’s structure is already correct. Characters such as & or # inside a parameter value are not escaped and will be misread, so encode each value with component mode first.

Is my input uploaded?

Tools run in your browser. Files, text and results are not uploaded to our servers and are cleared when you leave the tool.

Your privacy comes first

Tools run in your browser. Files, text and results are not uploaded to our servers and are cleared when you leave the tool.

Find your next tool
↑ ↓ · Enter ↵Esc · Close search