> For the complete documentation index, see [llms.txt](https://docs.tomat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tomat.ai/data-transformation/formulas/conversion-functions/toboolean.md).

# ToBoolean

Converts value to boolean type

```mathematica
ToBoolean(1) → true
ToBoolean("no") → false
```

#### Inputs

`ToBoolean(value, [replaceInvalidWith])`

* `value` - A value to convert into boolean
* `[replaceInvalidWith]` - **\[optional**: null by default\*\*]\*\* - invalid values will be replaced with this parameter

#### Description

We support the following text values (registered independent):

* 'true', 't', 'yes', 'y', 'on', '1' return true
* 'false', 'f', 'no', 'n', 'off', '0' return false
