format · validate · convert · runs locally

Parse JSON in PowerShell

How to parse a JSON string into an object and serialize (stringify) an object back to JSON in PowerShell. ConvertFrom-Json and ConvertTo-Json are built into PowerShell — no module needed. Raise -Depth for deep objects. Need to clean up the JSON first? Use the formatter & validator.

Parse JSON (string → object)

$obj = $text | ConvertFrom-Json

Stringify (object → JSON string)

$text = $obj | ConvertTo-Json -Depth 10

Frequently asked questions

How do I parse JSON in PowerShell?

ConvertFrom-Json and ConvertTo-Json are built into PowerShell — no module needed. Raise -Depth for deep objects. Parse with the snippet above; the result is a native object/map you can read.

How do I pretty-print JSON in PowerShell?

Use the stringify snippet above with indentation, or paste your JSON into the formatter on this page.