Webhook HMAC Signer
Sign and verify GitHub, Stripe, and Slack webhook signatures locally.
OpenGet model classes for a .NET client from one example payload.
Use one JSON object as the sample.
Each object becomes a class with JsonProperty attributes.
Change int to long or add nullability where needed.
Copy the code or download the file.
An ASP.NET service needs to call a partner API, and all you have is a sample payload pasted into their onboarding email. Rather than writing the DTOs field by field, paste the payload here and start from generated classes.
Each JSON object becomes a public class with auto-properties. Property names are converted to PascalCase, and each one carries a [JsonProperty("originalName")] attribute so Newtonsoft.Json maps camelCase or snake_case keys correctly. Whole numbers become int, decimals become double, booleans become bool and text becomes string. Arrays become List<T>, using the first element to decide T, and nested objects get their own class named after the key. The file starts with using directives for System.Collections.Generic and Newtonsoft.Json and can be downloaded as Model.cs.
A few things need a manual pass. Ids that exceed the int range should be long. A null value in the sample is typed as string, and an empty array as List<object>. If your project uses System.Text.Json instead of Newtonsoft, swap the attribute for [JsonPropertyName] and change the using directive. The root has to be an object, so for a top-level array paste a single element. If the payload will not parse, the JSON validator shows where it breaks, and the same sample can produce Java model classes for another team.
The classes are generated in your browser, and the payload is not transmitted anywhere.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
The generator expects an object at the root and walks its keys, so an array's indexes end up as property names. Paste one element of the array instead and use List
No. Properties are written as plain types. Add ? to properties that can be missing or null once you know the API contract.
The output uses classes with get and set accessors. Converting to a record is a quick edit, but keep the JsonProperty attributes on the properties so deserialization still maps the keys.