# The Object toLocaleString() method

> Learn how the JavaScript toLocaleString() method returns a string representation of an object and accepts an optional locale argument to customize it.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2019-04-20 | Topics: [JavaScript](https://flaviocopes.com/tags/js/) | Canonical: https://flaviocopes.com/javascript-object-prototype-tolocalestring/

Called on an object instance, returns a string representation of the object. Accepts an optional locale as argument.

Returns the `[object Object]` string unless overridden. Objects can then return a different string representation depending on the locale.

```js
const person = { name: 'Fred' }
person.toLocaleString() //[object Object]
```
