url_encode
Percent-encode text for safe inclusion in URL query parameters or path segments. Converts special characters, spaces, and non-ASCII text to valid URL format.
Instructions
Percent-encode a string for safe inclusion in a URL query parameter or path segment (encodeURIComponent). Returns the encoded string. Has no side effects. Free. Use when building URLs that contain special characters, spaces, or non-ASCII text. Do NOT use to encode a full URL — only encode individual query values or path segments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to URL-encode. |