---
schema_version: "1"
id: a92d30c0bdabe1ab8d557a314d52caf5123b8a33635ab6ed3341372e01faac75
title: decodeURI
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.11/dw-url-functions-decodeuri.md
canonical_url: https://docs.mulesoft.com/dataweave/2.11/dw-url-functions-decodeuri
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e7282a6ba73f1c1902624b8f9f2bbce989704e3c7e3541b47bfda9e74e756ba8
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: DataWeave
version: 2.11
---

# decodeURI

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## decodeURI(text: String): String

Decodes the escape sequences (such as `%20`) in a URI.

The function replaces each escape sequence in the encoded URI with the character that it represents,
but does not decode escape sequences that could not have been introduced by `encodeURI`. The
character `#` is not decoded from escape sequences.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>text</code></p></td><td><p>The URI to decode.</p></td></tr></tbody></table>

### Example

This example decodes a URI that contains the URL percent encoding `%20`, which is used for spaces.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::URL
output application/json
---
{
  "decodeURI" : decodeURI('http://asd/%20text%20to%20decode%20/text')
}
```

#### Output

```JSON
{
  "decodeURI": "http://asd/ text to decode /text"
}
```
