Tool

JSON to C#

Generate C# classes or records from JSON for System.Text.Json or Newtonsoft

How to use

  1. Paste your JSON object or array of objects into the input pane.
  2. Choose class or record output style.
  3. Pick the serializer: System.Text.Json (JsonPropertyName) or Newtonsoft (JsonProperty).
  4. Copy the generated classes; nested objects arrive as separate top-level classes.

About this tool

This converter targets .NET teams consuming REST APIs. It generates the boilerplate: PascalCase property names, serializer attributes mapping back to the original JSON keys, and List<T> collections. Record mode gives you immutable DTOs with init-only setters, matching modern C# codebase style.