Developer Tools
JSON to Java POJO Generator
Paste any JSON and get clean Java classes in return. Generate Lombok,
records, or plain getters/setters, with Jackson
@JsonProperty, nested classes, List<T> collections and
automatic LocalDate / BigDecimal / UUID detection.
Everything runs in your browser — your JSON is never uploaded.
Need the reverse? Try the Java Entity → JSON & TypeScript Generator.
From a JSON payload to typed Java classes
Hand-writing Java classes to match an API response is slow and error-prone. Paste the JSON, pick a style, and this generator produces idiomatic POJOs you can drop into a Spring Boot or plain Java project — fields, collections, nested types and Jackson bindings included.
What it generates
- Type inference —
String,int/long,double/BigDecimal,boolean, with date and UUID detection. - Nested classes — every JSON object becomes a class; array elements are merged and singularized.
- Collections — JSON arrays become
List<T>with boxed element types. - Jackson bindings — non-matching keys get
@JsonPropertysosnake_caseJSON maps cleanly tocamelCasefields. - Four output styles — Lombok
@Data, Javarecord, plain getters/setters, or fields only.
Frequently asked questions
How does JSON to Java POJO conversion work?
The tool parses your JSON, infers a Java type for every value, and generates classes. Objects become classes, arrays become List<T>, and the element types of arrays are merged so a uniform field type is produced. Field names are converted to camelCase and the original JSON key is preserved with a Jackson @JsonProperty annotation when they differ.
Can it generate Lombok, records, or plain getters and setters?
Yes. Choose an output style: Lombok (@Data with private fields), Java record (compact immutable components), Plain (private fields with explicit getters and setters), or Fields only. All four are valid, idiomatic Java you can paste straight into your project.
Does it detect dates, decimals and other types?
It does. ISO date strings map to java.time.LocalDate, date-times to LocalDateTime / Instant / OffsetDateTime, and UUID strings to java.util.UUID. Whole numbers become int or long by magnitude, decimals become double or BigDecimal (your choice for monetary precision), and you can opt into boxed wrapper types (Integer, Long) throughout.
How are nested objects and arrays handled?
Each nested JSON object becomes its own class, named after the key (array elements are singularized — "orders" produces an Order class). You can emit these as separate top-level classes or as static inner classes. Arrays of objects merge every element so the generated class covers all observed fields.
Is my JSON sent anywhere?
No. Parsing and code generation happen entirely in your browser with JavaScript. Your JSON never leaves your device, so it is safe to paste private API responses.
What is the reverse — Java to JSON?
Use the companion Java Entity (JPA) to JSON & TypeScript Generator, which takes Java / JPA entity classes and produces sample JSON or TypeScript interfaces, modelling one-to-one, one-to-many, many-to-one and many-to-many relationships.