Work with full URLs, path segments, query strings and user-entered values. Parse components, remove tracking noise, detect risky parameters and export code snippets for APIs.
Use encodeURIComponent for user-entered values that will become one path segment, one query key or one query value. Use encodeURI only when you already have a complete URL and want to preserve URL delimiters like colon, slash, question mark and ampersand.
Double encoding often appears as `%2520`, which means an already encoded `%20` was encoded again. That can break redirects, signed URLs, callback URLs and search filters.
Usually it keeps the destination while removing analytics parameters such as `utm_source`, `fbclid`, `gclid` or `msclkid`. Some sites misuse tracking parameters for routing, so test important campaign URLs before publishing.