RUN

URL Encode and Decode

Percent-encode text for URLs, decode it back, and see every query parameter in a URL.

Runs in your browser · nothing is uploaded

How to use the URL Encode / Decode

  1. Choose Encode or Decode and paste your text or URL.
  2. For encoding, pick Component to encode a single value (a search term or parameter), or Full URL to keep the URL’s structure (://, ?, & and /) intact.
  3. For decoding, + is read as a space by default, as in HTML form data. Turn that off for plain percent-encoding.
  4. When the input is a URL with a query string, its parameters are listed, already decoded.

About this tool

URLs may only contain a limited set of characters, so anything else, such as spaces, & inside a value, or non-English letters, is written as % followed by two hex digits for each UTF-8 byte. A space becomes %20 and é becomes %C3%A9. This is called percent-encoding or URL encoding.

The Component mode matches JavaScript’s encodeURIComponent and Python’s urllib.parse.quote with safe="": it encodes every reserved character, which is right for a single query value. The Full URL mode matches encodeURI and leaves characters that give a URL its structure alone, which is right when you have a whole address with a space or accent in it.

Double-encoding is a common bug: encoding an already-encoded value turns %20 into %2520. If you see %25 in a URL, something was encoded twice; decode it twice to read it.

Frequently asked questions

›Should a space be %20 or +?

Both mean a space in query strings submitted by HTML forms (application/x-www-form-urlencoded). In the path part of a URL only %20 is correct. Encoding here always produces %20, which works everywhere.

›What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ). encodeURI also leaves : / ? # & = and similar characters alone, so a full URL keeps working.

›Why does decoding fail?

A % must be followed by two hex digits, and the bytes must form valid UTF-8. The error points to the bad % or tells you the text used another character set.

›Is my data sent anywhere?

No. The tool runs entirely in your browser with JavaScript. What you paste is never uploaded, logged or stored on our servers, so it is safe to use with internal data, though you should still treat secrets with care on shared computers.