> ## 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.

# TRY_URL_DECODE

> Decodes form URL encoding, returning NULL for invalid input.

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

Returns NULL for NULL input. Invalid percent encoding or invalid decoded UTF-8 also returns NULL.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
try_url_decode(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. Invalid percent encoding or invalid decoded UTF-8 also returns NULL.

## 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 try_url_decode('a+b%2Bc') AS "value", try_url_decode('bad%2s') AS invalid;
```

| value | invalid |
| - | - |
| a b+c | NULL |

### Decode UTF-8 text

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT try_url_decode('%E7%8C%AB') AS decoded;
```

| decoded |
| - |
| 猫 |


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