URL Encoder / Decoder

Percent-encode or decode URLs and query parameters in a click. Handles whole URLs or single components, updates as you type, and runs entirely in your browser.

Why URL-encode?

URLs can only contain a limited set of characters. Anything outside that set — spaces, punctuation, symbols, non-English letters — has to be percent-encoded so browsers and servers read it the same way. Without it, a stray & or ? can silently break a link or truncate a query parameter.

How to use it

  1. Pick a direction. Choose Encode to make text URL-safe, or Decode to turn %-sequences back into readable characters.
  2. Paste your input. The output updates live. Use the swap button to flip the result back into the input.
  3. Choose the mode. Leave component mode on for a single value or path piece; turn it off to encode a full URL and keep :/?&= intact.

Component vs. full URL

  • Component mode (encodeURIComponent) escapes reserved characters too — ideal for one query value, e.g. encoding a&b to a%26b.
  • Full-URL mode (encodeURI) preserves the structure of a complete address, encoding only clearly unsafe characters like spaces.

Frequently asked questions

What is URL encoding?

URL (percent) encoding replaces characters that aren't safe in a URL — spaces, &, ?, #, accented letters and more — with a % followed by their hex code, so the URL is transmitted correctly. For example, a space becomes %20.

What's the difference between 'component' and full URL?

Component encoding (encodeURIComponent) escapes everything that isn't unreserved, including : / ? & = — use it for a single query value or path segment. Full-URL encoding (encodeURI) leaves those structural characters intact, so use it when encoding a whole URL.

Is my data sent anywhere?

No. Encoding and decoding run entirely in your browser with JavaScript. Nothing you paste is uploaded, logged or stored.

Why did decoding fail?

Decoding fails when the input contains an invalid percent-sequence, such as a lone “%” or “%ZZ” that isn't valid hex. Fix or remove the stray character and try again.

When do I need to URL-encode something?

Any time you put user input, search terms, redirect targets or special characters into a URL or query string — encoding prevents them from breaking the URL structure or being misinterpreted by the server.