Skip to content

JSON to Kotlin Online Free

New

Generate Kotlin data classes with kotlinx.serialization annotations from JSON.

  • Processed in your browser
  • Privacy-first
  • No account required
  • Nothing uploaded by default

Examples

Data class

Emits a @Serializable data class.

{"id":1,"title":"ToolBay"}

How JSON to Kotlin works

Generate Kotlin data classes with kotlinx.serialization annotations from JSON. Output is Kotlin-specific. Runs in your browser.

  1. 1. Paste JSON. Use a real API response so nested types come through.
  2. 2. Check the Kotlin output. Scan names, optionals, and nested types.
  3. 3. Copy the code. Drop it into your project and adjust if the sample was incomplete.
  • Generate Kotlin models from a real API JSON sample
  • Paste the output into an existing Kotlin project
  • Data class
Which serialization library is assumed?
kotlinx.serialization with @Serializable and @SerialName.

ToolBay does not store your input. Close the tab and it is gone. More developer tools.