How it works
encodeURIComponent escapes all reserved characters except those allowed in components; decode reverses %XX hex bytes to UTF-8.
How to use URL Encoder / Decoder
- Choose encode or decode mode.
- Paste the full URL or a single component depending on guidance.
- Copy the result into your href or fetch call.
- Decode user-submitted query strings for debugging.
Worked examples
Concrete numbers and cases you can check against the tool above.
UTM space fix
Encode “spring sale” in utm_campaign so analytics receives one intact value.
When to use URL Encoder / Decoder
Broken links often come from unencoded spaces or ampersands. Quick encode/decode fixes analytics tags and redirect builders.
Common use cases
- Encode a campaign utm_content with spaces.
- Fix plus-sign versus space ambiguity in forms.
- Decode redirect parameters in OAuth callbacks.
- Prepare filenames for CDN query parameters.
Inputs and outputs
- UTF-8 percent-encoding
- Component vs full-URI modes if labeled
Privacy
This tool runs entirely in your browser. Your data never leaves your device — nothing is uploaded to our servers.
Frequently asked questions
- Should I encode the whole URL?
- Often only query values need encoding; encoding :// breaks the scheme.
- How are plus signs handled?
- application/x-www-form-urlencoded treats + as space; raw URLs use %20.
- Does it support Unicode domains?
- IDN punycode is separate; encode UTF-8 path segments as UTF-8 bytes.