Percent-encode query values in the tab
Spaces, ampersands, and Unicode in query values break URLs if left raw. encodeURIComponent is the browser-native fix. This page applies it live with encode and decode toggles and a swap button.
Two panes like the Base64 tool. Copy output when non-empty. Sample string includes hello world query shape and emoji.
Nothing is posted. Use for one-off fixes, not as a proxy.
Campaign links and tokens
Marketing URLs with UTM params need consistent encoding. Build the full link in the UTM Builder & Campaign Link Generator, then spot-check individual values here.
JWT and Base64 strings in URLs are different problems. Decode JWTs in the JWT Decoder. Encode arbitrary UTF-8 with the Base64 Encoder Decoder.
JSON bodies beside your URL params: validate with the JSON Formatter & Validator.
Swap and round-trip
Swap moves output to input and toggles mode so you can round-trip a value. Clear wipes both panes.
Encode then decode should restore the original for valid UTF-8 text. Double-encoding is a common bug; swap helps you see it.
Plus signs in decode input are not treated as spaces; this is URI component encoding, not application/x-www-form-urlencoded plus semantics.
Frequently Asked Questions (FAQ)
Encode vs decode mode?
Encode runs encodeURIComponent on the input string. Decode runs decodeURIComponent. Toggle switches mode and re-runs conversion. Swap exchanges panes and flips mode.
What happens on bad percent-encoding?
decodeURIComponent throws on malformed sequences. The alert shows, output clears, copy disables. The script keeps running for the next edit.
Does this encode full URLs or only components?
Component scope: encodeURIComponent encodes ?, &, =, /, and spaces. For full URL building with UTM params, also see the UTM Builder on this site.
Are emoji and UTF-8 safe?
Yes. encodeURIComponent handles UTF-8 code units. Load sample includes an emoji to confirm no throw on encode.