AZ Tools

JSON to C# Class Converter

Developer

Paste any JSON object or array and get ready-to-use C# `class` definitions with typed auto-properties (string, long, double, bool, List<...>) and separate classes for nested objects. PascalCase property names bind to JSON keys with the case-insensitive matching used by Newtonsoft.Json. Everything runs locally in your browser — your JSON is never uploaded.

C# classes

How to use

  1. Paste or type your JSON into the input box.
  2. Optionally rename the root class (defaults to AutoGenerated).
  3. Copy the generated classes from the output box.

Frequently asked questions

How are numbers typed?
Whole numbers become long and numbers with a decimal point become double. Change to int or decimal manually if you prefer a different type.
What happens with null or empty arrays?
null values map to object and empty arrays to List<object>, since their type can't be inferred from the sample.
Why are property names PascalCase?
That's the standard C# convention. Newtonsoft.Json matches keys case-insensitively, and System.Text.Json binds when configured with PropertyNameCaseInsensitive.
Is my JSON sent anywhere?
No. Conversion happens entirely in your browser; nothing is uploaded.

Related tools