Inference rulesNested objects split into separate types; arrays are typed automatically; optional/nullable fields detected; mixed types form unions; null / empty arrays fall back to sane types; identical shapes are deduped and name clashes disambiguated.Runs locally — no fixed size limit (bounded by browser memory)
Sample JSONJSON
Paste or type JSON
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

🔒Processed locally in your browser — never uploaded or stored

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.