---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# URLSearchParams.toString()

The **`toString()`** method of the
`URLSearchParams` interface returns a query string suitable for use in a
URL.

## Syntax

```js
toString()
```

### Parameters

None.

### Return value

A string, without the question mark. (Returns an empty string if no
search parameters have been set.)
