katlab tools/json-to-types support on Ko-fi

JSON to Types · TypeScript, Go, Rust & more

Paste JSON or a JSON Schema and generate strongly-typed models for nine languages — powered by the quicktype engine, running entirely in your browser.

Code is generated locally. Your JSON never leaves your device.
Target language
Input
Generated code
Generated types will appear here.

How to generate types from JSON (free)

  1. Paste a JSON sample — or switch the input toggle to JSON Schema and paste a schema.
  2. Name the top-level type and pick a target language: TypeScript, Go, Rust, Python, C#, Swift, Kotlin, Java or Zod.
  3. The typed model regenerates as you type. Copy it or download it with the right file extension.

JSON to TypeScript, Go struct, Python and beyond

Hand-writing model types for an API response is tedious and error-prone. This tool infers the shape of your JSON — nested objects, arrays, optional fields, unions and enums — and emits idiomatic code: TypeScript interfaces or type aliases, a Go struct with JSON tags, a Rust struct with serde derives, a Python dataclass or Pydantic model, a C#, Swift, Kotlin or Java class, or a runtime-validating Zod schema. Each language exposes a few useful options, such as interfaces vs. type aliases, Pydantic vs. dataclasses, or the JSON framework for C#.

Powered by quicktype — running on your machine

The generation is done by quicktype, a mature open-source type generator. Most sites that offer it run it on a server, meaning your payloads are uploaded. Here the quicktype engine is compiled to a single self-hosted JavaScript bundle and loaded straight into your browser tab, so the work happens locally — nothing is sent anywhere.

JSON sample or JSON Schema?

A JSON sample is the quickest path: paste a representative response and the types are inferred from its structure. A JSON Schema gives you exact control — required vs. optional fields, enums, formats — and is generated verbatim rather than inferred. Use whichever you have. External $refs are not fetched, keeping the tool fully offline.

Is my data private?

Yes. There is no upload step and no account. API payloads and schemas are processed entirely inside your browser — open the network tab and watch: no request carries your data. Once the page has loaded, the generator works offline.