# URL Encode

Encodes problematic characters into percent-encoding, a format supported by URIs/URLs. For example, `=` becomes `%3d`. URL Encode lives in the **Data format** category of the `fx` menu. See [percent-encoding](https://datatracker.ietf.org/doc/html/rfc3986#section-2.1) for format details.

## Parameters

| Parameter                | Type    | Required | Default | Description                                            |
| ------------------------ | ------- | -------- | ------- | ------------------------------------------------------ |
| Input                    | string  | yes      | —       | Value to transform. Previous step output or a literal. |
| Encode all special chars | boolean | no       | `false` | Disabled by default.                                   |

`Input` is the primary value (previous step output or a literal).

## Returned value

| Type     | Description                              |
| -------- | ---------------------------------------- |
| `string` | Result of the URL Encode transformation. |

## Example

<details>
<summary>Percent-encode a query value</summary>

Encode characters that are unsafe in a URI. Use this before appending a value to a URL query string.

1. Set **Input** to the raw value. Paste:

   ```text title="Input"
   a=b&c=d
   ```

2. Leave **Encode all special chars** off for standard URI encoding, or turn it on to encode a wider set of characters.

3. Confirm **Output value** contains percent-encoded characters (for example `=` becomes `%3d`).

</details>
