> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# URL_ENCODE

> Encodes a string using application/x-www-form-urlencoded rules.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

Returns NULL for NULL input.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
url_encode(value)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING | Yes | The string to convert. |

## Returns

* Type: STRING
* Possible values: The encoded or decoded string.
* NULL behavior: Returns NULL for NULL input.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Usage notes

* Encoding maps spaces to plus signs; decoding maps plus signs to spaces.

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT url_encode('a b+c') AS "value";
```

| value |
| - |
| a+b%2Bc |

### Encode reserved characters

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT url_encode('a/b?x=1') AS encoded;
```

| encoded |
| - |
| a%2Fb%3Fx%3D1 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.