JSON ↔ C#

Convert JSON to C# classes and back

Loading...

About this tool

Generate C# classes from JSON and vice versa. Paste a JSON object and get the matching classes with typed properties, ready to use in .NET projects.

It saves the manual work of creating DTOs and models from API responses. Processing is local, in the browser.

How to use

  1. Choose the direction (JSON to class or class to JSON).
  2. Paste the content into the text area.
  3. Convert and copy the result.

Frequently asked questions

Are types inferred automatically?

Yes, from the JSON values (string, number, boolean, lists and nested objects).

Does it work with nested objects?

Yes, additional classes are generated for nested structures.

Is the data sent anywhere?

No, everything is processed in your browser.

Advertisement