JSON to Kotlin Data Class Generator
Turn JSON into Kotlin data classes with nullable types and serialization annotations.
Runs entirely in your browser — your data never leaves your device.
Loading tool…
How to use this tool
- 1Paste your JSON sample into the editor.
- 2Set the root class name.
- 3Copy the generated Kotlin data classes.
Frequently asked questions
- Are nullable types inferred?
- Yes. Fields that may be absent or null are typed as nullable in the generated Kotlin.
- Is it suitable for Android?
- Yes. The data classes work well with Retrofit and kotlinx.serialization for consuming REST APIs.
- Is my data uploaded to a server?
- No. Every tool on JSONPost runs entirely in your browser using JavaScript. Your JSON never leaves your device, so it is safe to use with private or sensitive data.
Related tools
JSON to Java POJO Generator
Generate Java classes with fields and Jackson/Gson-ready annotations from any JSON sample.
JSON to Swift Struct Generator
Generate Codable Swift structs from JSON with CodingKeys for snake_case mapping.
JSON to Dart Class Generator
Generate null-safe Dart classes with fromJson/toJson methods for Flutter apps.