Encode text for URLs or decode percent-encoded content. Choose full-URL mode for a complete address, or component mode for a path segment or query value.
Use URL component mode for a single query value or path segment. Use Full URL mode to preserve URL separators such as ://, ?, &, and /. The two modes follow encodeURIComponent/decodeURIComponent and encodeURI/decodeURI respectively.
hello world → hello%20world?q=hello%20world&lang=en