JSON to Java Class Generator

Paste a JSON sample on the left, get ready-to-use Java classes on the right — with correct types (String, long, boolean, List, Map) and @JsonProperty annotations so they work directly with Jackson.

100% Client-Side Instant No uploadYour data never leaves your browser

How to use this tool

Paste a representative JSON sample into the input on the left.

Java classes appear on the right after the quicktype engine loads (first run only — subsequent runs are instant).

Copy the output into a .java file. The root class is named Root by default; rename it to match your domain.

Generated classes include @JsonProperty annotations for Jackson. Nested objects become nested classes; arrays become List<T>.

Everything runs in your browser — safe to use with internal API responses.

Frequently asked questions

Which JSON library do the generated classes work with?

The output is annotated for Jackson (@JsonProperty), the de-facto standard in Spring Boot projects. Gson users can strip the annotations — the field names already match the JSON keys.

How are numbers typed?

Integers map to long and decimals to double. quicktype infers the narrowest type that fits every observed value.

How are nulls and optional fields handled?

Fields that appear as null become wrapper/object reference types (which are nullable in Java) rather than primitives.

Can I generate other languages?

Yes — TypeScript, Go, C#, Python, and Rust generators are also available, each with its own tool page.

Is this private?

Completely. quicktype runs in your browser; no JSON is uploaded to any server.

Related tools