Percent-encode a URL or query string, or decode one back to readable text.
URL encoding replaces unsafe characters (spaces, &, ?, #, etc.) with %-prefixed codes so they can be safely used in a URL or query string. Uses the browser's built-in encodeURIComponent/decodeURIComponent.