JSON to C# Class

Generate C# classes or records from JSON, with nullable reference types.

Support
Works Offline
Privacy First
No Login
No API

About the JSON to C# Class

Paste JSON and instantly get ready-to-compile C# class or record definitions. Nested objects become their own classes, arrays infer the singular type, and common value shapes are detected (DateTime, Guid, bool, int, double). Toggle record vs class, nullable reference types, JsonPropertyName attributes and List<T> vs array.

Popular uses

  • json to c#
  • c# class generator
  • csharp class from json
  • json to record
  • csharp code generator

Examples

User object

JSON{"id":42,"name":"Ada"}

Output

public class Root { public int Id { get; set; } public string Name { get; set; } }

Keyboard shortcuts

  • Copy the main outputCtrl / ⌘ + Shift + C
  • Download the resultCtrl / ⌘ + S
  • Share this toolCtrl / ⌘ + Shift + S
  • Reset the inputsAlt + R
  • Open the tool search paletteCtrl / ⌘ + K

Related tools

Frequently asked questions

Version 1.0.0 · Updated 2026-08-25 · Runs entirely in your browser