URL Encode / Decode

Percent-encode text so it is safe inside a URL, or decode a URL-encoded string back to readable text — free and instant. Everything runs locally in your browser and nothing is ever uploaded.

Component mode encodes every reserved character (: / ? & = #) — use it for a single query value or path segment. Full URI mode keeps those structural characters intact — use it for a whole address.

How to use the URL Encode / Decode tool

  1. Pick a mode. Choose Encode to make text safe for a URL, or Decode to turn a %20-style string back into plain text.
  2. Choose the target. Use Component for one query value or path segment, or Full URI for a complete address whose slashes and separators must stay intact. The result updates as you type.
  3. Copy or download. Grab the output with the copy button, save it as a file, or press Swap to feed the result back in and convert the other way.

About this tool

URL encoding — also called percent-encoding — replaces characters that are unsafe or reserved in a web address with a % followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, and a question mark becomes %3F. This is essential whenever you build query strings, REST API calls, redirect parameters or mailto: links by hand, because an unescaped & or # would otherwise be read as URL structure and break the request. Because the text is first turned into UTF-8 bytes, accented letters, non-Latin scripts and emoji all encode and decode correctly.

The Component mode mirrors JavaScript's encodeURIComponent and escapes every reserved character, which is what you want for a single value. The Full URI mode mirrors encodeURI and leaves the characters that give a URL its shape (: / ? & = #) untouched. The optional +-as-space switch matches the application/x-www-form-urlencoded format that HTML forms use. All conversion happens locally in your browser, so tokens, keys and private links never leave your device. Working with Base64 too? Try our Base64 Encode / Decode tool.

Frequently asked questions

What is the difference between Component and Full URI mode?

Component mode (like encodeURIComponent) encodes every reserved character, so it is safe for a single query parameter or path segment. Full URI mode (like encodeURI) preserves the characters that structure a URL — the colon, slashes, question mark, ampersand, equals and hash — so you can encode a complete address without breaking it.

When should I turn on "treat + as space"?

HTML forms submitted as application/x-www-form-urlencoded encode spaces as + instead of %20. Enable this option so a literal + in your input becomes a space when decoding, and spaces become + when encoding — matching how query strings from web forms behave.

Why do I get a "malformed" error when decoding?

A valid percent-encoded string uses % followed by exactly two hexadecimal digits, and the bytes must form valid UTF-8. A stray % or a truncated sequence like %2 cannot be decoded, so the tool shows an error instead of guessing. Check for copy-paste truncation.

Is my data sent to a server?

No. Encoding and decoding run entirely in your browser using the built-in URI functions. Nothing you type is uploaded, logged or stored, so it is safe for API keys, access tokens and private links.