JSON to Java Class (POJO) Converter
Paste any JSON object or array and get ready-to-use Java `class` definitions (POJOs) with typed fields (String, long, double, boolean, List<...>) and separate classes for nested objects. Everything runs locally in your browser — your JSON is never uploaded.
How to use
- Paste or type your JSON into the input box.
- Optionally rename the root class (defaults to AutoGenerated).
- Copy the generated classes from the output box.
Frequently asked questions
- How are numbers typed?
- Whole numbers become long and numbers with a decimal point become double. Change to int or float manually if you prefer a narrower type.
- What happens with null or empty arrays?
- null values map to Object and empty arrays to List<Object>, since their type can't be inferred from the sample.
- How are nested objects handled?
- Each nested object becomes its own class. An import for java.util.List is added when any list field is generated.
- Is my JSON sent anywhere?
- No. Conversion happens entirely in your browser; nothing is uploaded.
Related tools
JSON to Kotlin Data Class Converter
Turn a JSON object into Kotlin data classes with typed properties, in your browser.
JSON to C# Class Converter
Turn a JSON object into C# classes with auto-property type mapping, in your browser.
HTML → JSX Converter
Paste an HTML snippet and get React-ready JSX — `class` becomes `className`, `onclick` becomes `onClick`, void tags self-close, inline styles can be object-ified.
JSON to Go Struct Converter
Turn a JSON object into a typed Go struct with json tags, instantly in your browser.
JSON to Python Dataclass Converter
Turn a JSON object into Python @dataclass definitions with type hints, in your browser.
JSON to Rust Struct Converter (serde)
Turn a JSON object into Rust structs with serde derives and type-mapped fields, in your browser.