Types inferred from values
Objects become classes, integers become long and decimals become double. Same-type arrays become List<T>, while mixed arrays fall back to List<object>.
Preparing your comprehensive developer toolkit
Practical Guide
Generate C# classes from JSON with nested types and optional JsonPropertyName attributes. Edit with syntax highlighting and download a .cs file.
The generator infers a C# model from sample values. Objects become classes and arrays are represented as lists. A sample helps start a model for an API response or configuration file.
Objects become classes, integers become long and decimals become double. Same-type arrays become List<T>, while mixed arrays fall back to List<object>.
Keys that normalize to the same C# name get distinct identifiers. With JsonPropertyName enabled, each attribute preserves its exact JSON key.
Paste a representative JSON response, inspect its nested classes and export the C# source to use in a .NET project.
A top-level array is wrapped in an Items property, and a primitive is wrapped in Value. For a bare JSON array, deserialize the list type directly.
The nullable option adds a question mark when the sample contains null. Fields absent from the sample and the full API schema need to be checked separately.
Preserve JSON property names when using C# naming conventions.
Rules for valid C# identifiers and common naming conventions.
Open the tool to try these features.