URL-encode the value — not the whole internet by accident
Mixing up `encodeURIComponent` and `encodeURI` is a classic bug. Paste text; pick mode; see `%` escapes.
chars: 20
When to use
Building query strings, fixing broken redirects, or encoding path segments safely.
Examples
How it works
Component mode ≈ encodeURIComponent; URI mode ≈ encodeURI. Optional form-urlencoded spaces as +.
Common pitfalls
- Don’t double-encode already-% sequences.
- encodeURI leaves :/?&# alone — wrong for query values.
- + vs %20 depends on form vs component context.
How this differs
Encode for putting values on the wire; Decode to read logs. Query String Parser splits a whole query.
FAQ
Which mode for a query parameter?
Component.
Which mode for a full URL cleanup?
URI mode.
Is `+` a space?
In form bodies yes; in modern query encoding prefer `%20` unless form mode is on.
Reverse?
URL Decode.
Related tools
Runs in your browser. Nothing is uploaded. Not a security product —hashes and JWT decode are for debugging, not password storage or auth advice.