FREE · DEVELOPER TOOLS
JSON to Java Record.
Turn a JSON sample into Java records with Jackson @JsonProperty annotations, boxed types for optional fields and nested records.
Loading the calculator…
How to use JSON to Java Record
Paste a JSON object or an array of objects and name the root record. Copy or download Root.java.
How it works
Integers map to long, decimals to double, lists to List<T>; optional fields use Long, Double or Boolean so they can be null. Java keywords get a trailing underscore.
Example
The sample becomes public record User(long id, @JsonProperty("user_name") String userName, …) with Order and Address nested inside.
Questions about JSON to Java Record
Is JSON to Java Record free, and do I need an account?
Yes. This tool is free to use in your browser without an account. Processing takes place on your device.
What are the limits and what should I check?
Needs Java 16+ and jackson-databind 2.12+. Types are inferred from the sample only. Everything is calculated in your browser; nothing you type is uploaded. Review the result before using it in your work.
Is my input sent to a server?
Your input is processed in your browser and is not uploaded by this tool. Files and pasted text are cleared when the page is refreshed. Normal website requests are still required to load the page and its libraries. Read the privacy explanation.