format · validate · convert · runs locally

JSON to Kotlin

Paste JSON and get Kotlin data classes with inferred property types (Long, Double, Boolean, String, List, Any?), and nested data classes — ready for kotlinx.serialization or Moshi. Copy or download the .kt. Runs in your browser.

Frequently asked questions

What does it generate?

Idiomatic Kotlin data class declarations with val properties inferred from your JSON.

What types are used?

Integers become Long, decimals Double, strings String, booleans Boolean, arrays List<T>, and null becomes the nullable Any?.

How are nested objects handled?

Each nested JSON object becomes its own named data class.