Youtilities

JSON to Java Class

Generate Java records or POJO classes with Jackson annotations from any JSON.

Runs in your browser. Nothing is uploaded.

Input

Waiting for JSON

Java
Java types appear here.

What this does

Paste JSON and get Java types for it: a record per object (Java 16+), or a classic class with private fields, getters, and setters. Works with Jackson out of the box.

Types

Whole numbers are Long, decimals Double, and booleans Boolean, boxed so null is allowed. Arrays are List<T>. Empty arrays and mixed values become Object.

Names

Fields are camelCase. When that differs from the JSON key (first-name → firstName) a @JsonProperty annotation keeps the original. Two objects with the same shape share one type.

All