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

# 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
  }
}
```
