Webhook HMAC Signer
Sign and verify GitHub, Stripe, and Slack webhook signatures locally.
OpenStart a set of Jackson model classes from one sample response.
Use a JSON object with representative values.
Private fields carry @JsonProperty annotations.
One public class per file, then add accessors.
Copy the code or download it.
A Spring Boot service is adding a client for a payments API, and the provider's documentation includes a long example response. Writing the matching classes by hand means scrolling back and forth for every field, while generating them from the example gives you a solid starting point.
Each object in your JSON becomes a public class whose fields are private and annotated with @JsonProperty("originalKey"), so Jackson maps the payload even when keys use snake_case or hyphens. Whole numbers are typed int, decimals double, booleans boolean and text String. Arrays become List<T> typed from their first element, nested objects get their own class named after the key, and an empty array becomes List<Object>. Imports for JsonProperty and java.util.List are included, and the code downloads as Model.java.
The classes contain fields only. Add getters and setters, a constructor or Lombok's @Data before using them, or convert each class to a record. Java allows one public top-level class per file, so split the output into separate files or make the nested classes static members of Root. Large numeric ids should become long, and a null in the sample is typed as String, so revisit those fields. The C# class generator produces the .NET equivalent from the same payload, and the JSON viewer helps you inspect deep structures before converting.
Your sample is processed by script in this browser tab and is never uploaded.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
The generator keeps the output short and leaves the style to you. Add Lombok annotations, generate accessors in your IDE, or turn the classes into records.
The annotations are Jackson's. For Gson, replace @JsonProperty with @SerializedName and change the import; the field types stay the same.
List