JSON to Kotlin converter
Convert JSON to Kotlin data classes in your browser. Paste or drop a file — nothing is uploaded.
Ads
Paste or drop .json
Nothing leaves this device. No account required.
Generate Kotlin from JSON locally
Kotlin services and Android apps prefer data classes over Java-style POJOs. Turning a JSON sample into data class declarations with nullable types and List properties gives you idiomatic models ready to paste into a module.
What the Kotlin output includes
- Objects become data class declarations with val properties
- Optional JSON keys become nullable properties with = null defaults
- JSON arrays map to List<T>; null samples produce T?
- A root JSON array becomes a typealias to List of the item data class
How to convert JSON to Kotlin
- Paste JSON or drop a .json file into the converter.
- Choose a Root name for the top-level type if needed, then convert.
- Copy or download the Kotlin output — processing stays local.
FAQ
- Is this JSON to Kotlin converter free?
- Yes. Formatly generates Kotlin data classes from JSON in the browser at no cost and without an account.
- Is my JSON uploaded?
- No. The converter runs on this device. Your payload is not sent to Formatly servers.
- How are missing fields handled?
- When the same object shape appears with different keys in an array, missing keys become nullable properties defaulting to null.
Other code generators
Looking for formatters? JSON Formatter · All developer tools.