Convert JSON to Kotlin Data Class Online
Convert JSON into a Kotlin data class, right in your browser.
🔒 100% client-side — no data sent
Automatically generate Kotlin data classes from any JSON, with types correctly inferred. Everything runs 100% in your browser, keeping your code and data fully private.
What is it for?
- ▸ Create Kotlin models to deserialize a REST API response
- ▸ Generate data classes for an Android app using Gson or Moshi
- ▸ Save time by avoiding manually writing dozens of properties
- ▸ Quickly prototype a data layer from a JSON example
FAQ
How do I generate a Kotlin data class from JSON?
Paste your JSON into the tool and the matching Kotlin data classes are generated instantly with the correct types.
Does the tool handle nested objects and arrays?
Yes, nested objects become separate data classes and arrays are converted into typed Lists.
Are nullable fields supported?
Null values in the JSON are detected and the corresponding Kotlin type is marked nullable with a question mark.
Related tools
Base32 · encode / decode Encode and decode text to and from Base32 (RFC 4648) in your browser. Base58 encode/decode Encode and decode text in Base58 (Bitcoin, IPFS) right in your browser. Base64 · encode / decode Encode and decode text to and from Base64 (UTF-8), right in your browser. Base64URL encode/decode Encode and decode Base64URL (URL-safe variant used in JWT), in your browser. BBCode → HTML Convert forum BBCode into clean, sanitized HTML, right in your browser. Text ↔ binary Convert text to binary (ASCII/UTF-8) and back.