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

The **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).

## Syntax

```js
toString()
```

### Parameters

None.

### Return value

None [`undefined`](../../globals/undefined.mdx).
