Percent-encode text for safe use in URLs. Choose encodeURIComponent to encode a single query-string value (encodes &, =, ?, / etc.), or encodeURI to encode a full URL while keeping its structure characters intact. Decoding reverses either form.
Chinese and other non-ASCII characters are encoded as UTF-8 percent sequences (e.g. %E4%B8%AD). Everything runs locally in your browser.