JSON to Java Class

Free. No sign-up. Your input is processed in your browser.

Paste JSON and get Java classes.

How to use it

  1. Paste sample JSON.
  2. Keep Java selected, or switch to Kotlin, Python or Go.
  3. Copy each class into your project.

Output

Classes use public fields, with @JsonProperty where the Java name differs. Several classes are shown together; Java needs each public class in its own file. Add getters and setters if your project requires them.

Limits

Review types, especially numbers and dates. Python output lists differing JSON names in comments but does not map them for you.

Questions

Does it use Lombok?

No.

Which date type is used?

OffsetDateTime for values with a date, time and zone.

Related tools

See all tools