Guide: encode and decode URL components
Query strings need percent-encoding for spaces, `&`, `=`, and Unicode parameters. Mixing up `encodeURI` vs `encodeURIComponent` breaks OAuth redirects and webhook signatures.
Encode/decode runs locally — test strings are not logged server-side. Great for building `?q=…`, debugging callbacks, or reading copied address bar params.
Use after crafting search filters, OAuth state, or analytics payloads. Then hit the API tester or Open Graph preview for public links.
Step by step
- Paste text or partial URL — Use component encoding for query values; full-URL encoding keeps `://` and `/` intact.
- Toggle encode and decode — Decode shows `+` as space and `%20` — typical of `application/x-www-form-urlencoded` forms.
- Watch reserved characters — `#`, `?`, `&` are structural — do not encode the whole URL if fragments must survive.
- Apply to the request — Paste into fetch, `location.href`, or docs — use the API tester if the server returns 400.