Open huge JSON files instantly. Free & private.🔒 Your data never leaves your browser

JSON to C#

Generate C# classes from JSON with [JsonPropertyName] attributes, nullable types and PascalCase properties for System.Text.Json.

JSON
C#

How the C# classes are built

  • Properties use PascalCase with [JsonPropertyName("…")] for the original key, for System.Text.Json (.NET 6 and newer).
  • Values that can be null or missing become nullable (int?, string?). Others get safe defaults like "" and new().
  • Numbers too big for int become long. Mixed or unknown values become JsonElement?.

Deserialize

using System.Text.Json;

var data = JsonSerializer.Deserialize<Root>(json);
Console.WriteLine(data?.Title);

Smart type detection

Objects inside arrays are merged into one type, so a key that appears in only some items is still included (as optional). Names come from the keys, and plural keys become singular: comments → Comment. Whole numbers and decimals in the same field become a decimal type. Everything runs in your browser; your JSON is never uploaded.

More free tools