---
schema_version: "1"
id: 704c496aaac61fb24d2ebbbe7e46ce5fc0c9a4913bff86b74ae4203e99773b0c
title: parseURI
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.6/dw-url-functions-parseuri.md
canonical_url: https://docs.mulesoft.com/dataweave/2.6/dw-url-functions-parseuri
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 78161f0b6dcf3378bf0f423a0f40f4502530187df94d004f535e43e74a748fdb
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
---
product: DataWeave
version: 2.6
---

# parseURI

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

## parseURI(uri: String): URI

Parses a URL and returns a `URI` object.

The `isValid: Boolean` property in the output `URI` object indicates whether the parsing process
succeeded. Every field in this object is optional, and a field will appear in the output only if it
was present in the URL input.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>uri</code></p></td><td><p>The URI input.</p></td></tr></tbody></table>

### Example

This example parses a URL.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::URL
output application/json
---
{
  'composition': parseURI('https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#footer')
}
```

#### Output

```JSON
{
  "composition": {
    "isValid": true,
    "raw": "https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#footer",
    "host": "en.wikipedia.org",
    "authority": "en.wikipedia.org",
    "fragment": "footer",
    "path": "/wiki/Uniform_Resource_Identifier",
    "scheme": "https",
    "isAbsolute": true,
    "isOpaque": false
  }
}
```
