Data to Class

JSON to Java Class Generator

Generate Java POJOs, Lombok classes or records from JSON — with Jackson annotations, boxed types for nullable values and nested classes.

Loading JSON ↔ Java…

How it works

How to use the JSON ↔ Java

  1. Paste JSON

    Any object or array.

  2. Pick a style

    Plain POJO with getters/setters, Lombok @Data, or a Java 16+ record. Add a package name if you like.

  3. Map it

    Use Jackson ObjectMapper.readValue(json, Root.class) or Gson.

Type mapping

Fields use camelCase names with @JsonProperty when the JSON key differs. Whole numbers become int/long, decimals double, and values that can be null or missing use boxed types (Integer, Boolean). Arrays become List<T>. Nested objects are emitted as nested static classes so the output compiles as a single file. The reverse mode reads fields, records and annotations (Jackson and Gson) to build sample JSON.

Built for developers

Why developers use it

  • Private by design

    Runs 100% in your browser. Nothing you paste is uploaded, logged or stored on a server.

  • Instant results

    Output updates as you type, with precise error locations when something is wrong.

  • Works offline

    Once loaded, the tool keeps working without a connection. Install it as an app if you like.

  • Free, no sign-up

    No accounts, no limits, no watermarks.

FAQ

Frequently asked questions

Records or classes?

Records (Java 16+) are immutable and concise, and Jackson 2.12+ supports them. Use POJOs or Lombok if you need setters or older Java versions.

Does it support java.time types?

Yes — enable "java.time / UUID" to map ISO date-time strings to OffsetDateTime, dates to LocalDate and UUID strings to UUID.

Is my data uploaded anywhere?

No. This tool runs entirely in your browser. Your input never leaves your device, is not logged, and works offline once the page has loaded.

Keep going

Related tools

Private by design

Your data never leaves your browser.

498 free tools that run locally — no uploads, no sign-up, no tracking of what you paste. They even work offline.

  • 498free tools
  • 0bytes uploaded
  • 23categories