JSON to C#

Convert JSON to C# POCO classes or Records with System.Text.Json or Newtonsoft annotations.

100% Client-Side • Zero Server Upload
JSON Input
0 chars
0 chars | 0 lines | 0 B | Line 1
C# POCO Classes C#
0 lines | 0 B | Ready
C# Generator 100% In-Browser

JSON to C# (.NET) Class & Record Generator

Generate clean C# classes, records, and structs from JSON payloads. Fully compatible with .NET 6, 7, 8, and .NET Framework. Supports System.Text.Json ([JsonPropertyName]) and Newtonsoft.Json ([JsonProperty]) attributes, nullable reference types, and PascalCase property mapping.

Key Capabilities & Highlights

Modern C# 10 / 12 Records

Generate immutable record classes or standard C# POCO classes.

System.Text.Json & Newtonsoft

Choose your preferred serialization library attribute annotations.

Nullable Reference Types

Emits clean C# nullable annotations (string?, int?) to eliminate compiler warnings.

Namespace Customization

Configure custom C# namespace and root class name with instant preview.

How to Use JSON to C#

1
Paste JSON Code Paste sample JSON into the input panel.
2
Select .NET Options Select Class vs Record, serializer attributes, and nullable types.
3
Generate C# Code Click "Generate C#" to produce production-ready C# code.
4
Copy into Visual Studio Copy the code directly into Visual Studio, Rider, or VS Code.
Developer Pro Tip Select "Record" mode and "System.Text.Json" for optimal performance and minimal memory allocations in modern ASP.NET Core APIs.

Frequently Asked Questions

6 Answers

Yes! You can generate positional records, file-scoped namespaces, and nullable reference types.

Strings map to string, integers to int or long, decimals to double/decimal, booleans to bool, and arrays to List<T>.

Yes! The standard C# class output works seamlessly with Unity's JsonUtility or Newtonsoft Json.NET.

Zero server calls. The generator operates entirely inside your local browser.

No, absolutely not. All tool processing on FormatKit happens 100% client-side in your local browser using JavaScript. Your JSON, JWT tokens, SQL queries, and passwords are never transmitted over the internet to our servers or stored in any database.

Yes! All utilities on FormatKit are completely free to use for both personal and commercial software development projects with no restrictions or registration required.

Keyboard Shortcuts

Generate C#
Ctrl Enter
Copy C# Code
Ctrl Alt C
Download .cs File
Ctrl Alt D
Clear Input
Ctrl Alt K

100% Private & Secure

All computations and transformations execute strictly in your local browser session using client-side JavaScript. Zero tokens, passwords, or data are transmitted over the network or saved to remote databases.