JSON to Java POJO Converter (with Jackson)
Convert JSON to Java POJOs with Jackson @JsonProperty annotations, camelCase field names, List<T> for arrays, and generated getters/setters. Optional package declaration. 100% local.
Last updated:
CommentsPaste JSON to generate Java POJOs with Jackson @JsonProperty annotations, camelCase field names, List<T> for arrays, and getters/setters. Optional package declaration. 100% local.
Tips & Best Practices
- ▸For Lombok, delete the generated getters/setters and add @Data on the class.
- ▸For Java 17+ records, replace 'public class Foo { … }' with 'public record Foo(Type1 f1, …) {}'.
- ▸Jackson is the de-facto JSON library in Spring Boot; the annotations preserve original JSON keys where they differ from Java naming.
Frequently Asked Questions
Which JSON library is the output tuned for?
Jackson (the de-facto standard in Spring Boot). Fields that don't match Java camelCase get a @JsonProperty("...") annotation so deserialization from the original JSON keys still works.
Does it generate getters and setters?
Yes. Boolean fields get isX() naming; all others get getX() / setX(). If you prefer Lombok, delete the getters/setters and add @Data at the class level.
Can I convert to a Java Record instead?
The current output targets classic POJOs for maximum compatibility (Java 8+). For Java 17+ records, replace `public class Foo { … }` with `public record Foo(Type1 field1, …) {}` — the field types are already correct.
Is my JSON uploaded anywhere?
No. All conversion happens locally in your browser.
Try Next
JSON → Go
Convert JSON to Go structs online. Generates idiomatic Go structs with proper json tags and PascalCase field names.
Related Tools
JSON → YAML
Convert JSON to YAML online. Preserve structure, comments-free, and ready to paste into Kubernetes or CI configs.
YAML → JSON
Convert YAML documents to JSON online. Supports YAML 1.2, multi-document streams, and produces pretty-printed JSON output.
JSON → CSV
Convert an array of JSON objects to CSV online. Headers are inferred automatically from all keys across records.
CSV → JSON
Convert CSV data to a JSON array of objects online. Auto-detects delimiter and quotes, preserves numeric types when requested.
Number Base
Convert numbers between binary, octal, decimal, and hexadecimal. Supports arbitrarily large integers using BigInt.
JSON → TypeScript
Convert JSON to TypeScript interfaces instantly. Generate strongly-typed TS types from any JSON sample.