---
title: querystring.filter
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/query-string/querystring-filter
---

```
STRING querystring.filter(STRING url, STRING names)
```

**Available in:** all subroutines

Returns the given URL without the listed parameters.

The parameter names given in the filter list must be constant strings.
This is because these are compiled in advance for performance reasons,
and attempting to use a non-constant string will give a compilation error.

Each element in the filter list must be a single string,
with a single `querystring.filtersep` between each element.

An optional `+` can be used either side of `querystring.filtersep`,
similar to the syntax for string concatenation.
However, actual string concatenation, such as `"abc" + "xyz"`, is not allowed.

## Example

```vcl
set req.url = querystring.filter(req.url,
    "utm_source" + querystring.filtersep() +
    "utm_medium" + querystring.filtersep() +
    "utm_campaign");
```
