JSON to Java Class
Generate Java class definitions from JSON. Supports nested objects, arrays, Lombok annotations, Jackson @JsonProperty, and auto-generated getters/setters.
Generate C# class definitions from JSON. Supports nested objects, arrays, namespaces, JsonPropertyName attributes, nullable types, and record syntax.
This tool generates C# class definitions from JSON — ideal for quickly creating model classes from API responses, configuration files, or any JSON data structure.
Nested objects are expanded into separate named classes, arrays are typed as List<T>, and all classes are output in dependency order. Support for [JsonPropertyName], nullable reference types, and record syntax makes the generated code ready to drop into ASP.NET Core, MAUI, or any modern C# project.
Each nested object is converted into its own named C# class and referenced as a property type in the parent class. Classes are output in dependency order so the result can be pasted directly into a C# file.
Arrays are typed as `List<T>`. For arrays of objects, all keys across all elements are merged into a single class and output as `List<ClassName>`.
When "Use record" is enabled, properties use `{ get; init; }` instead of `{ get; set; }`, making instances immutable after creation. This requires C# 9 or later.
This tool generates System.Text.Json `[JsonPropertyName]` attributes. If you need Newtonsoft.Json `[JsonProperty]`, change the attribute name after generating.