JSON to C#
Paste JSON and instantly get matching C# class definitions with public properties and nested classes.
Input JSON
C# Output
Paste JSON and click Generate
Copied!
Summary
Paste JSON and instantly get matching C# class definitions with public properties and nested classes.
How it works
- Paste or type JSON into the input panel, or load a sample.
- Set a root class name (defaults to RootObject).
- Click Generate to parse the JSON and build C# classes.
- Nested objects become their own named classes; arrays of objects are scanned across all items to collect every property.
- Review the generated classes, each with public auto-properties, in the output panel.
- Click Copy to copy the C# code to your clipboard.
Use cases
- Scaffold a POCO for an incoming REST API response before writing a deserializer.
- Turn a sample config file into a typed C# settings class.
- Generate a starting class for System.Text.Json or Newtonsoft.Json without typing every property by hand.
- Document a third-party API response shape as C# types.
- Speed up building a .NET client for an API that only ships JSON examples.
- Check property naming and nesting before hand-writing a data model.
Frequently Asked Questions
Last updated: 2026-07-23 ·
Reviewed by Nham Vu