URL Encoder & Decoder

Choose Encode or Decode and a method, and the result appears as you type. It explains why a decode fails instead of just saying malformed, warns about double encoding, and breaks a full link into scheme, host, path and decoded query parameters.

Runs in your browser Developer tools

Parts of the link

Paste a full link, or a query string such as ?a=1&b=two, to see it split into parts.

Conversion runs in this tab with the browser’s own encodeURIComponent and decodeURIComponent. Nothing is sent or stored.

How to use

  1. Pick Encode or Decode, then choose the method: Component (encodeURIComponent) for a single value, Whole URL (encodeURI) to keep : / ? # & =, or Form to turn spaces into +.
  2. Paste your text or link into the left box. The result on the right updates live, and Load sample shows a link containing Chinese text.
  3. Read the status line: it states how many escapes were converted and warns when the input is already encoded or a result still contains escapes from double encoding.
  4. Check Parts of the link for the scheme, host, decoded path and a table of query parameters, then Copy result, or press Use result as input to chain another step.

Frequently asked questions

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent escapes everything that is not a letter, digit or - _ . ! ~ * ' ( ), including : / ? # & =, so it is the right choice for one value placed inside a query string. encodeURI keeps those separators and is for a whole address where only spaces and non-ASCII characters need escaping. Using encodeURI on a value that contains & or = silently breaks the query.

Why does decoding fail with a malformed error?

Either a % is not followed by two hexadecimal digits, or the escaped bytes are not valid UTF-8 — often text that was encoded in GBK or another character set. The tool tells you the position and which of the two it is. Turn on Keep invalid sequences to decode everything else and leave the bad parts as they are.

When should spaces be %20 and when +?

In a URL path always use %20. The + for a space belongs only to form-encoded query strings (application/x-www-form-urlencoded), so choose Form when you build or read that format. Decoding in Form mode also turns + back into a space, while the other modes keep a literal +.

Guides

Related tools