JSON to C#
Free online JSON to C# converter: generate classes with JsonPropertyName attributes, PascalCase properties and List<T>.
Privacy: all processing happens locally in your browser. Your input never leaves your device.
What is JSON to C#?
When a .NET app talks to a REST API, you need model classes that match the JSON. This tool generates C# classes from a sample JSON: PascalCase properties decorated with System.Text.Json [JsonPropertyName] attributes, integers mapped to long, arrays to List<T>, and nested objects as separate classes — all wrapped in a ready-to-use Models namespace.
How to Use
- Paste a sample JSON
- C# classes are generated automatically
- Copy into your project and adjust the namespace
FAQ
- Which serialization library is used?
- System.Text.Json by default (built into .NET Core 3.0+). For Newtonsoft.Json, swap the attributes to [JsonProperty].
Related Tools
JSON Formatter & ValidatorFree online JSON formatter and validator with inline error hints, collapsible tree view and in-browser processing.JSON MinifierFree online JSON minifier: compress JSON to one line, see live size savings, and validate syntax — processed locally.JSON Escape / UnescapeFree online JSON escape and unescape tool for quotes, newlines and backslashes — fix nested escaping locally.JSON Key SorterFree online JSON key sorter: recursively order object keys alphabetically so semantically identical JSON diffs cleanly.JSON Diff & CompareFree online JSON compare tool: ignores key order, listing added, removed and changed fields by path — all local.JSON to TypeScriptFree online JSON to TypeScript converter: infer interfaces from JSON — nested types, union arrays, optional nulls.
Last updated 2026-09-04