Skip to main content
Version: 3.27.2

URLSearchParams.toString()

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

Syntax

toString()

Parameters

None.

Return value

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