JSON to C# Class Converter
Generate C# class definitions from JSON data. Input your JSON structure, specify class and namespace names, and get complete C# classes with properties, attributes, and serialization support.
Input JSON
Enter JSON structure
Click to load sample JSON with nested objects and arrays
Generated C# Classes
Classes will appear here
How to Use
1. Input JSON
Paste your JSON data in the input editor. The converter supports nested objects, arrays, and various data types.
2. Configure Settings
Set the root class name, namespace, and choose your preferred JSON serialization library.
3. Generate Classes
Click "Generate C# Classes" to create all necessary C# classes with proper structure and attributes.
4. Download Results
Copy individual classes or download all classes as separate .cs files for your project.
Serialization Options
Newtonsoft.Json: Uses JsonProperty attributes, compatible with older .NET projects
System.Text.Json: Uses JsonPropertyName attributes, for .NET Core 3.0+ projects
None: Plain C# classes without serialization attributes