Back to Developer
URL encode / decode — safe query strings

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.

developerURLencodedecode

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