JSON Codegen

Turn sample JSON into types/structs for TS, Go, Java, Kotlin, C#, Swift, Rust, Python, and more — or SQL INSERT.

All processing on this page runs locally in your browser unless noted otherwise.

Input
Result
Local offline processing — data is never uploaded

How to use

  1. Paste representative JSON.
  2. Pick language, root name, naming style, and optional fields.
  3. Copy or download the generated code.

Example

{
  "id": 1,
  "userName": "ada",
  "active": true,
  "profile": { "city": "Shanghai", "age": 30 }
}

FAQ

Is nested type inference perfect?

It is best-effort from the sample. Review generated types before shipping.

What does SQL mode expect?

An object or array of objects; each row becomes an INSERT.

Related tools