Input
59 chars · 59 bytes
Output
0 chars · 0 bytes
URL encode and decode online — encodeURI and encodeURIComponent
Percent-encode and decode URLs and URI components instantly, with both encodeURI (whole URLs) and encodeURIComponent (query values) semantics. Runs locally — paste URLs containing tokens without worry.
Frequently Asked Questions
- What is the difference between encodeURI and encodeURIComponent?
- encodeURI preserves characters that structure a URL (:, /, ?, &) and is for encoding complete URLs; encodeURIComponent encodes those too, and is what you need for individual query-string values.
- Why do spaces become %20 or + in URLs?
- Percent-encoding renders a space as %20. The + convention applies only in application/x-www-form-urlencoded query strings — decoders treat them differently, which causes many bugs.
- When must I URL-encode a value?
- Any time user data goes into a URL: query parameters, path segments, or redirect targets. Unencoded &, =, or # characters will silently corrupt the URL structure.
- Why is my URL double-encoded (%2520)?
- %2520 is %20 encoded again — some layer encoded an already-encoded value. Decode twice here to confirm, then find and remove the redundant encoding step.