URL Encode/Decode

Common use cases:

  • Encode query parameters for URLs
  • Encode special characters (spaces, &, =, etc.)
  • Decode URLs copied from browsers

About the url encode / decode

Percent-encode text so it is safe to put in a URL, or decode a percent-encoded string back to readable text. Use it for query parameter values, redirect URLs and anything containing spaces, &, = or non-ASCII characters. It uses the standard encodeURIComponent and decodeURIComponent functions.

How to use it

  1. Choose Encode or Decode.
  2. Paste your text or encoded string into the input box.
  3. Click URL Encode or URL Decode.
  4. Copy the result, or swap to reverse the direction.

Questions

What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves characters like /, ?, & and = alone because it expects a whole URL. encodeURIComponent, which this tool uses, encodes them too, which is what you want for a single query value or path segment.
Why is a space sometimes %20 and sometimes +?
%20 is standard percent-encoding. + means a space only in HTML form encoding (application/x-www-form-urlencoded). This tool outputs %20 and does not turn + into a space when decoding.
Should I encode a whole URL?
Usually not. Encode each parameter value separately, then assemble the URL; encoding the whole thing turns :// and ? into escapes and breaks the link.