JSON to Java Converter

Generate Java classes, lists and Jackson JSON converters from nested JSON samples. Keep original field names through serialization mappings.

How to generate Java models

Paste a representative JSON object or array, choose a root type name and run the generator. Use the file selector to inspect each source file; Copy copies only the selected file. Download ZIP keeps all generated files together. Original JSON field names are mapped in complete output even when they are language keywords or contain punctuation.

Complete output uses Jackson 2.x Databind and its annotations on Java 8 or later; add that dependency in your project. Keep each public class in the filename shown and the io.quicktype package. Models-only output has getters/setters but omits Jackson mappings and converters.

Samples, optional fields and limits

For several responses of the same shape, select JSON Lines and put one JSON document on each line. Fields missing from some object samples become optional; an explicit null contributes a nullable type. Empty arrays and null-only fields do not contain enough evidence to infer a precise element or value type. Add representative samples and review the generated model.

String values stay strings, including numeric IDs, dates and UUIDs. This infers a model from examples, not a full API contract. Limits: 200,000 characters, 64 nesting levels, 50 sample documents, 50 generated files and 1,000,000 output characters. Processing runs locally in a cancellable worker with a 10-second deadline.

Questions & answers

Are missing fields the same as null?

No. Missing fields indicate optional membership; null is a value. The target language may represent both through an optional or nullable type. Provide multiple samples and use All fields optional only when that matches your application.

Does this fetch schemas or send JSON to an API?

No. Only the JSON samples you enter are used. No schema URLs or JSON strings are fetched, and the generated program is not executed on this page.

Other Languages