JSON to C# Classes
Paste JSON and get C# classes or records. More data tools
Generate C# classes from JSON
Properties use PascalCase, nullable values use ? types, lists use List<T> and [JsonPropertyName] keeps the original key for System.Text.Json. You can choose a class or a record.
Features
- Live: the result updates while you type.
- Clear errors: the line, the reason and, where possible, a one-click fix.
- Open and drop files, copy or download the result, and share your input as a link.
- Send to another tool: pass the result straight to a related tool.
- Private: Everything runs in your browser. Your data is not uploaded to any server.
Related data tools
- JSON to TypeScript: Paste JSON and get TypeScript interfaces.
- JSON to Python: Paste JSON and get Python dataclasses, TypedDicts or Pydantic models.
- JSON to Go: Paste JSON and get Go structs with json tags.
- JSON to Java: Paste JSON and get Java records or classes.
- All DataMint tools
Frequently asked questions
Does it work with Newtonsoft.Json?
Newtonsoft matches names without case, so it usually works. Swap the attribute for [JsonProperty] if needed.
Is my data private?
Everything runs in your browser. Your data is not uploaded to any server. You can even use the tool offline once the page has loaded.