---
name: "up.Params.stripURL"
area: "API"
kind: "Class method"
parent: "up.Params class"
visibility: "experimental"
url: "https://unpoly.com/api/up.Params.stripURL"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.Params class](https://unpoly.com/api/up.Params.md)</nav>

# up.Params.stripURL(url)

**This feature is experimental**. Please [share](https://github.com/unpoly/unpoly/discussions) your experiences so we know what to keep or change.

Returns the given URL without its [query string](https://en.wikipedia.org/wiki/Query_string).

<nav aria-label="Contents">

#### Contents

- [Example](#example)
- [Parameters](#parameters)
- [Return value](#return-value)

</nav>

## Example {#example}

```js
let url = up.Params.stripURL('http://foo.com?key=value')
// url is now: 'http://foo.com/'
```

---

## Parameters {#parameters}

### url {#url}

(required)

A URL (with or without a query string).

Type: string

---

## Return value {#return-value}

The given URL without its query string.

Type: string

