Mr. Encoder

URL Encoder / Decoder

Percent-encode or decode URLs and query strings, and break a URL into its parts and query parameters.

How to use

  1. Paste the text, query value or full URL into the input box.
  2. Choose Component or Full URL mode and, for HTML form data, enable + for spaces.
  3. Click Encode or Decode, copy the result and check the URL parser for the decoded query parameters.

Frequently asked questions

What is URL encoding (percent-encoding)?

URL encoding replaces characters that are not allowed or have a special meaning in a URL with a % followed by their UTF-8 bytes in hex, for example a space becomes %20 and ç becomes %C3%A7.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent also encodes reserved characters such as / ? & = and #, so it is the right choice for a single query value or path segment. encodeURI leaves those characters alone and is meant for encoding a complete URL without breaking its structure.

Should spaces be encoded as + or %20?

%20 is valid everywhere in a URL. The + sign means a space only in application/x-www-form-urlencoded data, such as HTML form submissions and most query strings, so enable the + option when working with form data.

Why do I get a malformed URL error when decoding?

Decoding fails when a % is not followed by two hexadecimal digits, or when the bytes do not form valid UTF-8 (for example %E7 alone, which is a Latin-1 encoded ç). Fix or encode the stray % as %25 and try again.

Other tools