Como usar: JSON to C#
- Paste a JSON sample in the input — C# is already selected.
- Set the root type name and options such as optional fields and date detection.
- Copy the generated C# code into your project.
JSON to C# classes
Each JSON object becomes a C# class with PascalCase properties and [JsonPropertyName("key")] attributes, so System.Text.Json maps the original camelCase or snake_case keys. Arrays become List<T>, optional values become nullable types (int?, string?), and ISO dates can be typed as DateTime.
Deserializing
JsonSerializer.Deserialize<Root>(json) reads the JSON. With Newtonsoft.Json, swap the attributes for [JsonProperty("key")].
Private by design
The conversion runs entirely in your browser — API responses with customer or internal data are never uploaded.
Também pesquisado como: json to c# classes, convert json to c#, c# classes from json, json c# generator.
Ferramentas que combinam com: JSON to C#
- JSON para Tipos — Cole uma resposta da API e receba modelos prontos para uso em 8 linguagens: TypeScript, Python (dataclass, TypedDict ou Pydantic), Go, Java, C#, Kotlin, Swift e Rust.
- Formatação JSON — Cole o JSON aqui para formatá-lo, compactá-lo ou validá-lo.
- JSON Validator — Paste JSON to check whether it is valid.
- JSON Schema Validator — Paste a schema and some JSON to see exactly which values break which rule — or generate a starting schema from example data.