JSON to C# - Generate Classes from JSON
Generate C# classes from JSON data. Speed up your .NET development with auto-generated models.
About JSON to C# Conversion
When working with JSON APIs in .NET applications, you need C# classes to deserialize the data. This tool generates those classes automatically from example JSON data.
The generated code uses System.Text.Json attributes and follows C# naming conventions. Simply copy the generated classes into your project and start deserializing JSON immediately.
Related Tools
Frequently Asked Questions
The generated classes use modern C# features including auto-properties, JsonPropertyName attributes for JSON serialization, and List<T> for arrays. The code is compatible with System.Text.Json.
JSON keys are converted to PascalCase for C# property names. If the JSON key differs from the C# name, a JsonPropertyName attribute is added to ensure correct serialization.
Integer values become 'int' (or 'long' for large values), and decimal values become 'double'. All number types can hold null values if the JSON contains null.