Developer Tool
JSON to C# Entity Generator
Paste JSON and generate clean C# classes, DTOs, entities or records with namespace, nullable reference types and JSON property attributes.
JSON Input
JSONC# Output
Ready
Serialization Attributes
Generate System.Text.Json JsonPropertyName or Newtonsoft.Json JsonProperty attributes.
Nested Classes
Nested objects and arrays of objects are converted into separate C# classes.
Type Inference
Detects string, bool, numeric types, DateTime, Guid, arrays and nullable values.
JSON to C# Entity
This page is designed for developers who need an online JSON to C# entity tool with clean C# output, nullable reference types, nested classes and JSON serialization attributes.
- Convert JSON objects into C# classes or records.
- Generate System.Text.Json or Newtonsoft.Json property attributes.
- Infer arrays, nested objects, nullable values, DateTime, Guid and numeric types.
- Customize namespace, root class name and output style.
FAQ
Frequently asked questions
Can this tool generate JsonPropertyName attributes?
Yes. You can choose System.Text.Json and generate JsonPropertyName attributes for each property.
Does it support Newtonsoft.Json?
Yes. You can choose Newtonsoft.Json and generate JsonProperty attributes.
Can it create nested C# classes?
Yes. Nested JSON objects and arrays of objects are converted into nested C# model classes.