URL encode / decode — safe query strings
Convert between plain text and %XX percent-encoded URL strings. Toggle between encodeURIComponent / encodeURI (and their decode counterparts). UTF-8 based, runs entirely in your browser.
How to use
Pick a mode (Encode / Decode) and a Scope (encodeURIComponent / encodeURI, or their decode counterparts), paste your string, then press Run. Use component scope for individual query values; use whole-URI scope when you want to preserve URL structure. UTF-8 based, so Japanese and emoji round-trip safely. Sample button preloads a typical input. Copy or download the result as .txt.
FAQ
- Is my text sent to any server?
- No. We use the browser-native encodeURIComponent / encodeURI / decodeURIComponent / decodeURI. Everything runs locally.
- What's the difference between encodeURIComponent and encodeURI?
- encodeURIComponent escapes every URL-reserved character (: / ? # & = + etc.) — use it for individual query values or path segments. encodeURI preserves overall URL structure and only escapes spaces and non-ASCII characters.
- And decodeURIComponent vs decodeURI?
- decodeURIComponent decodes every percent-encoded byte (: / ? # & = + included). decodeURI keeps URI-structure escapes intact so the result still parses as a URI.
- Does it treat + as a space?
- No. The + → space substitution is part of application/x-www-form-urlencoded (form submissions), which is different from standard URL percent-encoding.
- I get a 'URI malformed' error
- On decode, the input contains broken %XX sequences (e.g. %ZZ or an incomplete %A). Make sure the source was originally UTF-8 percent-encoded.
- Why merge encode and decode into one tool?
- Percent-encoding and decoding are two directions of the same conversion. A mode toggle keeps them in a single UI; the Scope selector works for both directions.
Related tools
Base64 encode / decode — URL-safe variant supported
Convert between plain text and Base64. Encode with an optional URL-safe variant; decoding accepts URL-safe (- _, no padding) automatically. UTF-8 safe and runs entirely in your browser.
URL parse — host, path, query, fragment
Break a URL into protocol, host, port, path, query, hash, etc. with the browser's URL API. Query parameters are auto-expanded into a table (percent-decoded). Copy individual parts or download the whole breakdown as JSON. Runs entirely in your browser — your URL stays local.
Punycode converter — IDN ⇄ xn--
Convert internationalized domain names (IDN) such as Japanese or emoji domains to and from Punycode (xn-- form). Convert many domains at once, one per line. Powered by punycode.js — runs entirely in your browser.
Base32 / Base58 encode & decode
Convert text to and from Base32 (RFC 4648 / TOTP 2FA secrets) and Base58 (Bitcoin addresses). Switch the variant (Base32 / Base58) and direction (encode / decode). UTF-8 byte based, so Japanese and emoji round-trip. Runs entirely in your browser.