﻿---
title: ES|QL URL_DECODE function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/3016/reference/query-languages/esql/functions-operators/string-functions/url_decode
products:
  - Elasticsearch
---

# ES|QL URL_DECODE function
<applies-to>
  - Elastic Stack: Generally available since 9.2
</applies-to>


## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/3016/reference/query-languages/esql/images/functions/url_decode.svg)


## Parameters

<definitions>
  <definition term="string">
    The URL-encoded string to decode.
  </definition>
</definitions>


## Description

URL-decodes the input, or returns `null` and adds a warning header to the response if the input cannot be decoded.

## Supported types


| string  | result  |
|---------|---------|
| keyword | keyword |
| text    | keyword |


## Example

```esql
ROW u = "https%3A%2F%2Fexample.com%2F%3Fx%3Dfoo%20bar%26y%3Dbaz"
| EVAL u = URL_DECODE(u)
```


| u:keyword                            |
|--------------------------------------|
| https://example.com/?x=foo bar&y=baz |