Skip to content
Run here 100% in your browser, no upload, no login

URL Codec

Percent-encode and decode URLs with encodeURIComponent or encodeURI, plus plus-sign handling.

How to use it

  1. Choose a mode: Encode (encodeURIComponent) for query values, Encode (encodeURI) for whole URLs, or Decode.
  2. Paste text or a percent-encoded string into the left panel; output updates as you type.
  3. Toggle Space / plus when working with application/x-www-form-urlencoded forms that write spaces as +.
  4. The decode mode reports invalid percent sequences (such as a lone %E4%BD) instead of guessing.
  5. Copy the result into your code, config or address bar.

Common use cases

Why it stays private

Encoding and decoding are single function calls in your browser's JS engine. URLs, tokens and query parameters stay in the tab.

FAQ

Q: When do I use encodeURIComponent versus encodeURI? A: encodeURIComponent escapes every reserved character and is meant for parameter values; encodeURI keeps structural characters like : / ? # & intact so a whole URL stays a valid URL.

Q: Why does the plus sign toggle matter? A: HTML forms encode spaces as +, while standard percent encoding uses %20. The toggle converts in whichever direction the current mode needs.

Q: What causes a decode error? A: Truncated or orphan percent sequences, like %E4%BD at the end of the input, are not valid UTF-8 and cannot be decoded — the tool reports the problem rather than emitting replacement characters.

Your data stays on this device

URL Codec runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.