JSON to Java

Generate Java POJO classes from any JSON object — with getters, setters and proper naming.

JSON Input
Java Output

Java classes will appear here

Ready
Paste JSON and generate Java
0
Classes
0
Fields
Free Code Generator

JSON to Java POJO Generator

Paste any JSON object and instantly generate Java POJO (Plain Old Java Object) classes. The generator creates private fields with proper Java types, optional getters and setters, optional Lombok @Data annotation, and optional Jackson @JsonProperty annotations — all running locally in your browser.

How to generate Java from JSON

  1. Paste your JSON object into the input panel.
  2. Enter the root class name (default: Root).
  3. Choose whether to include getters/setters, Lombok, or Jackson annotations.
  4. Click Generate Java.
  5. Copy or download the .java file.

Features

  • Generates Java POJO classes with private fields.
  • Proper Java type mapping: String, Integer, Double, Boolean, Object, List.
  • Nested objects become separate inner or standalone classes.
  • Optional Lombok @Data annotation to skip boilerplate.
  • Optional Jackson @JsonProperty annotations.
  • Download as .java file.

Frequently Asked Questions

What Java types are used?

The generator maps: JSON string → String, JSON number (integer) → Integer, JSON number (decimal) → Double, JSON boolean → Boolean, JSON null → Object, JSON array → List<T>, JSON object → a new class.

What is Lombok @Data?

Lombok is a Java library that generates boilerplate like getters, setters, equals, hashCode and toString at compile time. With the @Data annotation you don't need to write these manually.

Is my JSON sent to a server?

No. All generation runs entirely in your browser. Your JSON never leaves your device.