Dev Tools

JSON → C# Classes

Generate C# classes from JSON with public properties ({ get; set; }), nested classes, and using statements.

Root class name
JSON input
C# output
using System.Collections.Generic;

public class Address
{
    public string Street { get; set; }
    public string City { get; set; }
    public string Zip { get; set; }
}

public class Order
{
    public int Id { get; set; }
    public double Total { get; set; }
    public List<string> Items { get; set; }
}

public class Root
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Email { get; set; }
    public bool Active { get; set; }
    public double Score { get; set; }
    public Address Address { get; set; }
    public List<string> Tags { get; set; }
    public List<Order> Orders { get; set; }
    public object Metadata { get; set; }
}
Was this page helpful?

Related tools