DTayl.me
JSON to C# Class Converter
Input JSON
Convert to C#
Clear
Load Sample
C# Classes
Download as .cs File
Copy to Clipboard
// Generated C# classes will appear here
Configuration
Save Current Config
Namespace
Root Class Name
Preserve comments in JSON
Include auto-generated comment
Include unique config URL in auto-generated comment
Naming Conventions
Property Naming
PascalCase
camelCase
Preserve Original
Class Naming
PascalCase
Preserve Original
JSON Attributes
JSON Library
None
Newtonsoft.Json
System.Text.Json
Type Options
Make value types nullable
Make reference types nullable
Initialize collections as empty
Simple collection initialization
Use bytes for small integer values
Generate interfaces (IClassName)
Generate XML documentation
Class Type Options
Class Type
Standard Class
Record
Immutable Class
Member Type
Properties
Fields
Make properties read-only
Make collections read-only
Newtonsoft.Json Options
NullValueHandling
Default
Include
Ignore
System.Text.Json Options
JsonIgnoreCondition
Default
Always
Never
WhenWritingNull
WhenWritingDefault
Collection Options
Collection Type
List<T>
IEnumerable<T>
ICollection<T>
T[]
HashSet<T>
Date/Time Handling
Date Format
Auto-detect
ISO 8601
DateTime
DateTimeOffset