Toolgeist › Developer
JSON to Kotlin Data Class Converter — Free, Instant
Paste JSON to generate a matching Kotlin data class — correct property types inferred, and fields that could be absent marked nullable — ready to paste directly into an Android or backend Kotlin project instead of hand-writing the class.
How to use JSON to Kotlin
- Paste your JSON.
- Review the generated Kotlin data class.
- Copy it into your project.
Frequently asked questions
- Are nested JSON objects handled?
- Yes — nested objects generate their own named data class referenced from the parent class.
- Does it mark fields as nullable appropriately?
- Fields explicitly present as null in your example are generated as nullable types; fields always present with a value are non-nullable by default.
- Is this compatible with kotlinx.serialization or Gson?
- The generated data class works with either — you may want to add the relevant @Serializable or @SerializedName annotations depending on which library your project uses.
Related Developer tools
Also searched for: json to kotlin data class generator · json to kotlin converter online · kotlin data class from json
Browse all 738 free tools on Toolgeist →