> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/utils/case-conversions/cameltosnake.md).

# camelToSnake

Converts a `camelCase` string to a `snake_case` string.

**Parameters**

* `str` **{string}**: The `camelCase` string to convert.

**Returns**

* **{string}**: The converted `kebab_case` string.

```javascript
const result1 = camelToSnake('camelCaseString');
console.log(result1); // Output: camel_case_string
```
