All tools / Converters

JSON to C# Class

Generate C# classes with properties from JSON.

Runs in your browser · your data never leaves your device
Ad space

How it works

Each JSON object becomes a class with PascalCase properties. Names that change get a JsonPropertyName attribute so System.Text.Json still maps them. Whole numbers become int (or long if large), decimals double, and arrays become List.

Frequently asked questions

Can I use it with Newtonsoft.Json?

Yes, but swap the JsonPropertyName attribute for [JsonProperty("name")] and the matching using statement.

Why is a property typed object?

Null values and empty arrays carry no type information, so they become object.

Related tools