Convertful
ImagePDFVideoAudioDocumentSEODeveloperUtilityGuides

Image Tools

  • Compress Image
  • Resize Image
  • Remove Background
  • HEIC to JPG
  • All Image Tools →

PDF Tools

  • Compress PDF
  • Merge PDFs
  • Split PDF
  • PDF to Images
  • All PDF Tools →

Video & Audio

  • MOV to MP4
  • FLAC to MP3
  • Video to GIF
  • All Video Tools →
  • All Audio Tools →

Developer

  • JSON Formatter
  • JWT Decoder
  • Regex Tester
  • SQL Formatter
  • All Developer Tools →

Document & SEO

  • Excel to JSON
  • JSON to Excel
  • All Document Tools →
  • SERP Snippet Preview
  • Robots.txt Generator
  • All SEO Tools →

Utility

  • QR Code Generator
  • Word Counter
  • Color Converter
  • Text Diff
  • All Utility Tools →
All processing happens in your browser. Your files never leave your device.
AboutGuidesTermsPrivacyContact
© 2026 Convertful. All rights reserved.
HomeDeveloperJSON to C#

JSON to C#

Generate C# classes from sample JSON. Free, private, runs in your browser.

100% private — your files and text never leave your browser. All processing happens locally on your device.

Generator Settings

Paste JSON above to generate code.

You might also need

JSON to ZodGenerate Zod schemas from sample JSON
JSON to JavaGenerate Java classes or records from JSON
JSON to TypeScriptGenerate TypeScript interfaces from a JSON sample
JSON to Go StructGenerate Go structs with JSON tags from a sample

Generate C# Models Locally

JSON to C# converts sample JSON into classes with nested models, List<T> arrays, sanitized property names, nullable annotations, and optional serialization attributes.

System.Text.Json Or Newtonsoft

Choose System.Text.Json, Newtonsoft.Json, or no attributes. When attributes are enabled, original JSON keys are preserved even when C# property names are sanitized.

Model Output Needs Review

The generator infers from examples, so heterogeneous arrays become object-like fallbacks and null fields may need manual refinement. Copy or download the result, then adapt it to your project conventions.

FAQ

Can JSON to C# add serialization attributes?

Yes. Choose System.Text.Json, Newtonsoft.Json, or no attributes.

How are reserved words handled?

Class and property names are sanitized into valid identifiers, while enabled attributes keep the original JSON keys.

Does it infer nullable fields?

It can emit nullable reference annotations and marks sample nulls or reference-like fields where practical.

Are nested arrays supported?

Nested arrays and objects generate List<T> types when the sample has a consistent element shape.

Is my JSON uploaded?

No. Generation happens locally in the browser and the output can be copied or downloaded.