---
schema_version: "1"
id: 725388e35ecef29f94732d534abbafc404b98b373634df86b6ae0a0ae1090d15
title: parseURI
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-url-functions-parseuri.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-url-functions-parseuri
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 5e4ef2474dab575f137cb8d5016cadab26ea7bd7416361778fceb593ce81036e
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

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