About this JSON to C# class converter
Convert any JSON sample into strongly typed C# classes or records. Property types (string, int, double, bool, DateTime, nested objects and lists) are inferred automatically, which saves time when consuming REST APIs with System.Text.Json or Newtonsoft.Json.
How to use the JSON to C# Classes
- Paste a JSON sample.
- Choose class or record output and a root type name.
- Copy the generated C# code into your project.
Example
{"id":1,"tags":["a"]} → public class Root { public int Id { get; set; } public List<string> Tags { get; set; } }Frequently asked questions
Does it handle nested objects and arrays?
Yes. Nested objects become their own classes and arrays become List<T> of the inferred element type.
Which serializer attributes are generated?
Property names are converted to PascalCase and [JsonPropertyName] attributes keep the original JSON names.
Is my data safe?
Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.
Is it free?
Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.