Free online JSON to Kotlin data class generator. Convert JSON data to Kotlin data class code with Gson/Moshi/Kotlinx serialization annotations, automatic recursive nested object support. Pure frontend, no data upload.
It supports three major frameworks: Gson (@SerializedName), Moshi (@Json or @field:Json), and Kotlinx Serialization (@Serializable). Choose the annotation style that matches your project serialization framework.
Yes. The generated data class includes val/var properties, default values, annotations, and companion object. Copy directly into your Android/Kotlin project. Make sure to add the corresponding serialization dependency.
Yes. The tool offers nullable (T?) and non-null (T) modes. Null/missing fields automatically use nullable types. Numeric types support default value configuration - choose 0, 0.0, or no default.
Nested objects automatically generate independent data class definitions. Arrays become List<T> with generic type inference. Maps become Map<String, T>. The tool recursively processes all nesting levels.
Absolutely. This tool runs 100% in your browser. Your JSON data is processed locally in memory and is never uploaded to any server. The data is cleared immediately after processing.
Help us improve this tool. Share your suggestions, bug reports, or feature requests.
Submit Feedback