Output will appear here
Output will appear here
Convert JSON to Java classes online with Jackson annotations, typed fields, and getter/setter methods. This free JSON to Java POJO generator creates production-ready classes that work with Jackson ObjectMapper and Gson for instant API response deserialization.
Try Convert All - paste JSON once, see TypeScript, Go, YAML, and 15 more formats instantly.
Enter a JSON object or array into the input editor. The converter handles nested objects, arrays of mixed types, and deeply structured API responses.
The output pane displays Java POJO classes with private fields, getters, setters, and Jackson annotations like @JsonProperty for each key. Nested objects produce separate inner or top-level classes.
Copy the generated classes or download them as .java files. Drop them into your Maven or Gradle project and deserialize JSON with ObjectMapper immediately.
Paste your JSON into the input editor and the tool instantly generates Java POJO classes with typed fields, getters, setters, and Jackson annotations. You can copy the output directly into your IDE and start deserializing JSON with Jackson ObjectMapper.
Yes. Every field includes a @JsonProperty annotation mapping the original JSON key name to the Java field. The top-level class also includes @JsonIgnoreProperties(ignoreUnknown = true) so unexpected fields in the JSON payload do not cause deserialization failures.
Integer values map to Integer or Long depending on magnitude. Decimal values map to Double. If an array contains both integers and decimals, the element type is promoted to Double to avoid data loss.
The generated POJOs work with Gson out of the box since Gson relies on field names by default. The @JsonProperty annotations are Jackson-specific but will not interfere with Gson. You can optionally replace them with @SerializedName if you prefer a pure Gson setup.
Each nested object generates its own Java class named after the parent key in PascalCase. The parent class references it as a typed field, so a key called "billing_address" produces a BillingAddress class and a private BillingAddress billingAddress field in the parent.