encode_url
Percent-encode a string with encodeURIComponent so reserved characters survive transport inside a URL. Returns JSON { encoded }. It escapes the structural characters too — : / ? # & = all become %XX — so it is for a single query-string value or path segment, NOT for a whole address you still want to be clickable. This is escaping for URLs only. It is the wrong transform for making binary-unsafe content fit in JSON, an HTTP header or a data URI, which call for Base64 rather than percent-encoding. Reverse it with decode_url.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The value to percent-encode, typically one query-string value or path segment. Everything outside A-Z a-z 0-9 - _ . ! ~ * ' ( ) is escaped, including slashes and colons. |