JSON to C# Class
Generate strongly typed C# classes from a JSON sample in a single click.
Input
Result
How to use
Generating C# classes
Paste a representative JSON object and press Convert. Nested objects and arrays become their own classes.
- Paste a JSON sample.
- Press Convert.
- Copy the generated classes into your project.
Frequently asked questions
Which naming convention is used?
Properties are generated in PascalCase, the standard convention for C# models.
Are nullable types detected?
Properties that contain null in the sample are generated as nullable types.
Related tools
JSON to TypeScript
Generate TypeScript interfaces from a JSON sample with optional and union types.
JSON Formatter
Beautify and validate JSON with configurable indentation, error highlighting and one click copy.
JSON Parser
Parse JSON and inspect the resulting structure, types and value counts.
JSON Validator
Check whether your JSON is valid and see a clear explanation of any syntax problem.
JSON Minifier
Remove every unnecessary space and newline to produce the smallest possible JSON payload.
JSON Viewer
Read JSON in a clean formatted view and explore it as a collapsible tree.