Skip to main content
Code Generators

JSON → C#

Generate C# models from JSON directly in your browser.

Your data stays in your browser.

Generator options
Tool guide

About the C# generator

Infer C# classes from JSON while preserving original property names through optional serializer attributes.

What it infers

  • Nested objects become classes and arrays become generic lists.
  • Nullable values and optional properties use nullable value or reference types when configured.
  • Whole numbers use int or long according to their observed range; decimal values use decimal.
  • Date-like strings can become DateTime.
  • Attributes can target System.Text.Json, Newtonsoft.Json or be omitted.

How to use it

  1. Paste a representative JSON sample.
  2. Choose the root class name, serializer attributes and nullable options.
  3. Generate and review the classes before integrating them.

Notes

Inference is sample-based. The generator emits classes in one output and does not add namespaces, records, init accessors or multiple files.

Privacy

Type inference and C# generation run locally in your browser. The JSON sample is not uploaded.