Paste a Java POJO/DTO/record and instantly generate the matching JSON Schema plus mock JSON data.
Paste your Java classes to produce a JSON Schema instantly.
Supports collections, nested objects, Maps, and popular annotations.
The converter understands common POJOs, Lombok data classes, records, builders, and DTOs that contain nested objects, generics, arrays, Lists/Sets, and Maps. It reads annotations such as @JsonProperty, @SerializedName, @JsonInclude, and nullable hints to keep naming and optionality aligned with your serialization framework.
Primitive wrappers (Integer, Double, Boolean, etc.), Java time types, enums, Optionals, and generic collections all map to their closest JSON Schema equivalents. When type information is missing (for example, raw List fields without generics) we warn you and fall back to reasonable defaults so the schema remains valid.
Use the schema for API documentation, validation, contract testing, code generation, or form builders. The sample JSON is produced from the schema and is perfect for Postman collections, integration tests, or quick demos when you need realistic payloads without creating them manually.
Open the settings panel and select any parsed class from the dropdown. By default we pick the first public class, but you can switch to nested classes or DTOs declared later in the file at any time without reloading the page.