JSON to C# Class

Generate C# classes from JSON with [JsonPropertyName] attributes for the modern System.Text.Json serializer. For Newtonsoft.Json, swap to [JsonProperty] and add using Newtonsoft.Json;.

How to use the JSON to C# Class

Paste JSON. Output uses System.Text.Json (the default in modern .NET 6+). For records, you can collapse the property syntax to public record Response(string Id, string Name); manually.