URL Encoder / Decoder

Percent-encode text for safe use in URLs and query strings, or decode an encoded URL back into readable text. Choose component or full-URL mode depending on what you're encoding.

url-encoder · runs locally

What this URL encoder does

A URL can legally contain only unreserved ASCII characters; everything else — spaces, quotes, non-Latin letters, and reserved symbols like & and ? used outside their structural role — must be percent-encoded. This tool applies the browser’s own standards-compliant functions (encodeURIComponent and encodeURI) so its output matches exactly what JavaScript, servers and HTTP libraries expect.

Decoding reverses the process, turning %20, %C3%A9 and friends back into readable text. The decoder also converts + to a space, so query strings copied from form submissions decode correctly.

How to encode or decode a URL

  1. Pick Encode or Decode.
  2. If encoding, choose Component for a single value or Full URL for a complete address.
  3. Paste your text and click the convert button.
  4. Copy the result into your link, code or campaign builder.

A practical example

Building a UTM-tagged link for the campaign name summer sale & launch? Encoding it in component mode gives summer%20sale%20%26%20launch — paste that as the utm_campaign value and analytics tools will read the full name instead of truncating at the ampersand. Debugging the opposite problem (a mangled link from a log file) is a one-click decode.

Frequently asked questions

What is URL encoding (percent-encoding)?

URLs may only contain a limited set of ASCII characters. URL encoding replaces every other character with a % followed by its UTF-8 byte value in hex — a space becomes %20, an ampersand becomes %26. This lets arbitrary text travel safely inside a URL.

What is the difference between component and full-URL mode?

Component mode (encodeURIComponent) encodes everything including / ? & and =, which is what you want for a single query-string value. Full-URL mode (encodeURI) preserves those structural characters so an entire URL stays functional while unsafe characters inside it are escaped.

Why do some URLs use + for spaces?

The older application/x-www-form-urlencoded format from HTML forms encodes spaces as +. Modern percent-encoding uses %20. This decoder accepts both and treats + as a space, matching how servers interpret query strings.

When do I need to URL-encode text?

Whenever user-supplied or arbitrary text goes into a URL: search queries, redirect targets, UTM parameter values, filenames in paths, and API parameters. Skipping encoding causes broken links, lost data after an unencoded &, and subtle security issues.