JSON to C# Class Generator
Code GeneratorsGenerate strongly-typed C# classes from JSON instantly. Nested objects, List<T>, DateTime, nullable types, JsonPropertyName attributes and PascalCase options — copy ready-to-use code.
Paste an API response (or click "Load Sample") to generate strongly-typed C# classes.
JSON to Pydantic Model Generator
Generate Python Pydantic v2 BaseModel classes from JSON. Nested models, Optional fields, list[...] and dict[...] hints, aliases via Field — copy-paste ready Python code.
JSON to YAML Converter
Convert JSON to clean, readable YAML instantly. Choose 2 or 4 space indentation, validate JSON in real time, then copy or download — nothing ever leaves your browser.
JSON to CSV Converter
Convert JSON arrays or objects to CSV instantly. Nested objects are flattened into dot notation, arrays kept as clean JSON cells, with live preview and one-click .csv download.
JSON to Excel Converter
Turn JSON arrays into real .xlsx spreadsheets in seconds. Auto-sized columns, a live spreadsheet preview, plus one-click Excel and PDF table export — 100% local and free.
How to Use
Three steps from raw data to finished output — no account required.
- 1
Paste the JSON response you want to model, or load the sample payload.
- 2
Toggle JsonPropertyName attributes and PascalCase property naming to match your project style.
- 3
Copy the generated C# classes — including nested models — straight into your .NET project.
Frequently Asked Questions
Everything you need to know about the json to c# class generator.
It maps JSON to int, long, double, bool, string, DateTime, List<T>, Dictionary<string, object> and nested classes, adds nullable annotations (#nullable enable), honors first-seen property order and emits using directives ready for System.Text.Json.
It adds [JsonPropertyName("...")] above each property to preserve the original JSON key. Enable it when System.Text.Json must deserialize camelCase or snake_case payloads into properties with different C# names.
Enable PascalCase to follow official .NET naming guidelines — camelCase keys such as userId become UserId. Combined with JsonPropertyName, you get idiomatic C# identifiers that still deserialize from the exact original JSON keys.
Yes. The output includes the System.Text.Json.Serialization namespace and JsonPropertyName attributes, so Deserialize<T> works immediately. The same classes also work with Newtonsoft.Json when you add its JsonProperty attribute.