DeveloperAdded
JSON to C# Class
Generate C# classes with auto-properties from a JSON sample, ready for System.Text.Json or Newtonsoft. Nested objects and lists are typed for you.
Generate C# classes
212 / 232Result
WaitingRun the tool and the result appears here. Copy it or download it — nothing leaves this tab.
Privacy
The JSON is parsed in this tab and never leaves the browser, which matters when the payload comes from production.
How to use it
Paste a JSON object or array with one representative element.
Set the root class name; nested objects take the name of their key.
Copy the classes into your project. Add nullable annotations if your project uses them.
When to use it
.NET API clients
Model a third-party response once and let System.Text.Json do the mapping.
Unity tools
Editor tooling and save files are often JSON; typed classes make them inspectable.
Quick prototypes
Paste into a scratch project instead of writing twenty properties by hand.
Questions
Does it use records or classes?
Classes with auto-properties, which work in every C# version and serialize the same way with either JSON library.
Are nullable types generated?
A JSON null becomes object, the honest fallback. If a field is optional in your API, change it to string? or int? after generating.
Which JSON library does this match?
Property names are PascalCase, which both System.Text.Json and Newtonsoft map from camelCase by default.