JSON to Java Record: quick start guide

Everything you need for a first successful run: what to paste in, which option actually matters, and how to read the result.

Input JSON to Java Record Output Runs 100% in your browser — your data never leaves your device.
JSON to Java Record — Input → Output. Runs 100% in your browser — your data never leaves your device.

How to use

  1. Open the tool and paste your input into the left pane.
  2. Set only the options your task actually needs — the defaults are correct for most inputs.
  3. Read the result in the right pane; it updates as you type.
  4. Use Copy to take the result, or Download to save it as a file.
How to use · JSON to Java Record 1 Paste your data intothe input box (or loadthe example). 2 Configure the optionsto match your targetformat or scenario. 3 Copy, download orinspect the output —it updates live as youtype.
How to use — 3

Examples

Field names are snake_cased and primitive types are boxed for use in a record component list.

Input

{"id":42,"title":"Hello","tags":["a","b"],"active":true}

Output — Results

public record Root(
    long id,
    String title,
    List<String> tags,
    boolean active
) {}

Run

Description

Generate a Java record with boxed types and snake_case field names from a JSON sample.

JSON to Java Record → · How to use → · Data Conversion Tools →

Related tools