JSON to C#
Generate C# classes from any JSON sample.
Three steps, no reading required.
Paste your input
Drop text, code, or data into the input pane — from an API response, a file, anywhere.
See it process
The result updates instantly as you type.
Copy the result
Grab the output with Copy or Download, or fix the error shown if the input is invalid.
Try it with a sample.
{"id":1,"userName":"Ada","active":true,"roles":["admin","user"],"address":{"city":"London"}}Upload & hope
- Sends your input to a server to process it
- Asks for an account after a few free uses
- Limits input size on the free tier
Runs where you are
- Processes everything inside your browser tab
- No account, ever
- No artificial size limit
Questions worth answering upfront.
No. Classes are generated entirely in your browser. Your JSON is never uploaded, stored, or logged.
JSON keys are converted to PascalCase properties. When the property name differs from the key (for example snake_case), a [JsonPropertyName] attribute is added so System.Text.Json maps it correctly.
Value types that are optional or null become nullable (for example int?). Reference types like string and classes are already nullable.
The generated attribute targets System.Text.Json. For Newtonsoft.Json, swap [JsonPropertyName] for [JsonProperty] — the class shapes are otherwise identical.
Yes. Every tool on DevUtilsNow is free to use with no account required.
People who use this also reach for
Guides that pair with this tool
How to Generate C# Classes from JSON
Turn a JSON sample into C# classes for System.Text.Json — property naming, attributes, nullable types, and Newtonsoft compatibility.
Need another tool?
36+ browser-based utilities — all free, all private, nothing to install.