Free to use, no account
JSON Model Generator
Paste a JSON sample to draft TypeScript, C# or Java model declarations. Arrays and nested objects are inferred from the sample; nothing is uploaded.
How do I generate a model from JSON?
Paste a JSON object or array, choose TypeScript, C# or Java, enter a root class name and generate. Review the inferred types before using the code.
Frequently asked questions
How do I generate a model from JSON?
Paste a JSON object or array, choose TypeScript, C# or Java, enter a root class name and generate. Review the inferred types before using the code.
Is my JSON uploaded or saved?
No. Parsing and model generation run in this browser tab. Your JSON is not sent to a server or stored by this tool.
How are optional and nullable properties inferred?
A property seen with null is marked nullable where the language supports it. In an array of objects, a property missing from some sampled objects is marked optional in TypeScript or noted in generated C# and Java.
Does this check that generated code compiles?
No. It infers declarations from the JSON example only. Review names, numeric ranges, null handling and generated syntax in your compiler before using it in an application.
What happens when the sample contains multiple value types?
TypeScript can express union types such as string | number. C# and Java use object/Object for heterogeneous unions; Java null and optional details are comments, not runtime validation.