WebTool

JSON to C#

Free online JSON to C# converter: generate classes with JsonPropertyName attributes, PascalCase properties and List<T>.

Privacy: all processing happens locally in your browser. Your input never leaves your device.

What is JSON to C#?

When a .NET app talks to a REST API, you need model classes that match the JSON. This tool generates C# classes from a sample JSON: PascalCase properties decorated with System.Text.Json [JsonPropertyName] attributes, integers mapped to long, arrays to List<T>, and nested objects as separate classes — all wrapped in a ready-to-use Models namespace.

How to Use

  1. Paste a sample JSON
  2. C# classes are generated automatically
  3. Copy into your project and adjust the namespace

FAQ

Which serialization library is used?
System.Text.Json by default (built into .NET Core 3.0+). For Newtonsoft.Json, swap the attributes to [JsonProperty].

Related Tools

Last updated 2026-09-04