# ConvertTo-Json

say it: **“kun-VURT-too JAY-sun”** **/kənˈvɝtˌtu ˈdʒeɪsən/**

Converts objects to JSON text; \`ConvertFrom-Json\` does the reverse.

## What is **ConvertTo-Json**?

`ConvertTo-Json` turns objects into JSON text; `ConvertFrom-Json` turns JSON text back into objects. Add `-Depth` for nested data.

```powershell
@{ title = 'Pancakes'; tags = @('breakfast') } | ConvertTo-Json
Get-Content .\settings.json -Raw | ConvertFrom-Json
```

Level: Journeyman · [More PowerShell terms at this level](https://www.ask-codey.com/glossary?category=powershell&level=3)

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/convertto-json
