JSON to Kotlin Data Class Generator

Paste JSON and get idiomatic Kotlin data classes with nullable fields and annotations.

Summary

Paste JSON and get idiomatic Kotlin data classes with nullable fields and annotations.

How it works

  1. Paste sample JSON
  2. Select annotation library
  3. Enter root class name
  4. Click Generate and copy the Kotlin code

Use cases

  • Building Android Retrofit models from API responses
  • Bootstrapping Ktor server DTOs from JSON
  • Typing Kotlin multiplatform payloads

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu