URL Encode / Decode

Percent-encode or decode URLs and query strings, and break any URL into its parts and query parameters. Free and runs in your browser.

How to encode or decode a URL

  1. Choose Encode or Decode.
  2. For encoding, pick Component to escape a single value (like a search term) or Full URL to keep slashes, ? and &.
  3. Type or paste your text. The result updates as you type.

Reading a URL

Paste any address into the URL parser to see its scheme, host, port, path, fragment and every query parameter, already decoded. Repeated parameters such as tag=a&tag=b are listed separately.

Frequently asked questions

What is URL encoding?

URL encoding, or percent-encoding, replaces characters that are not allowed or have a special meaning in URLs with a % followed by two hex digits. A space becomes %20 and é becomes %C3%A9 (its UTF-8 bytes).

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent escapes everything that could break a single part of a URL, including / ? & = and #, so use it for query values and path segments. encodeURI leaves those characters alone because it expects a complete URL.

Should spaces be %20 or +?

Both are common. %20 works everywhere in a URL. The + sign means a space only in query strings encoded as application/x-www-form-urlencoded, which is what HTML forms and URLSearchParams produce.

Why do I get a malformed URI error?

Decoding fails when a % is not followed by two hex digits, or when the bytes do not form valid UTF-8. This tool shows where the bad sequence is.