How to Convert JSON to C# Classes?
Converting JSON to C# is a common task for .NET developers when working with APIs. Our tool makes it effortless:
- Paste JSON: Enter your JSON data into the left editor.
- Set Options: Choose your namespace, class names, and preferred C# features.
- Copy Result: Instantly get well-formatted C# code on the right.
- Download: Export the result as a `.cs` file directly into your project.
Powerful Features for .NET Developers
Newtonsoft.Json Support
Automatically adds `[JsonProperty("name")]` attributes for compatibility with the most popular JSON library.
System.Text.Json Support
Supports the modern .NET JSON library with `[JsonPropertyName("name")]` attributes.
C# 9 Record Types
Optionally generate `public record ClassName(...)` for immutable data structures.
Nullable Reference Types
Full support for `string?` and other nullable annotations introduced in C# 8.0.