Kotlin Generator

Generate Kotlin data classes and models from JSON data structures

JSON Input

Loading...

Generated Kotlin

Enter JSON data to generate Kotlin data classes

Supports data classes, kotlinx.serialization and null safety

Frequently Asked Questions

What Kotlin features are supported?

The generator creates Kotlin data classes with support for kotlinx.serialization, Gson, and Jackson annotations for JSON serialization, plus modern Kotlin language features like null safety and data classes.

Can I generate kotlinx.serialization compatible classes?

Yes! Choose 'kotlinx' as the framework to generate classes with @Serializable and @SerialName annotations for type-safe JSON serialization support.

How does Gson and Jackson integration work?

When selecting Gson or Jackson frameworks, the generator adds appropriate annotations (@SerializedName or @JsonProperty) to fields for proper JSON serialization/deserialization.

How is package structure handled?

You can specify a custom package name in the options. The generator will add the appropriate package declaration at the top of the generated Kotlin file.