Sample JSONJSON
GeneratedKotlin
Paste or type JSON
JSON → data class · Local · No upload
JSON to Kotlin Data Class Generator
Sample JSON → data class · @Serializable · SerialName · Nullable fields
No upload, no storage
JSON is processed in memory and never sent to a server.
Share via URL fragment
Share links encode data in the # anchor — never sent to a server.
Remember last edit
Optionally keep your last input locally; clear it with one click.
Generate Data Classes from JSON|kotlinx.serialization Annotations|SerialName Mapping|Nullable Fields with Defaults|Runs Locally
Generate Data Classes
Nested objects split into separate data classes — paste straight into an Android project.
kotlinx.serialization Ready
Adds @Serializable so you use the official reflection-free serializer.
SerialName Mapping
When a camelCased property drifts from the original key, @SerialName pins the JSON name back.
Nullable with Defaults
Missing and nullable fields become nullable types defaulting to null, so partial payloads still parse.
Runs Locally — No Upload
Generation runs in your browser; data is never uploaded.