Skip to content
Jellykit

JSON to Java Class

Convert JSON into Java POJO classes with private fields, getters and setters, List types and a class for every nested object. Ready for Jackson or Gson. Free.

Runs in your browser. Nothing is uploaded.

About JSON to Java Class

JSON to Java generates plain old Java objects for a payload: private fields with camelCase names, typed getters and setters, List<...> for arrays and a separate class for each nested object.

The classes work with Jackson, Gson and Spring's message converters out of the box, since they follow standard bean naming.

How to use JSON to Java Class

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. Adjust the options. The result updates as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

Can it generate records or Lombok?

It generates classic getters and setters. Converting them to a record or adding @Data is a quick edit if your project uses those.

Why long instead of int?

JSON numbers can exceed int's range, so long is the safe default for whole numbers.

Is JSON to Java Class free and private?

Yes. JSON to Java Class is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →