JSON to TypeScript, Go, Python & More
Generate types from a JSON sample in TypeScript, Go, Rust, Python, Java, C# or Kotlin — 100% in your browser.
About JSON to TypeScript, Go, Python & More
Paste a JSON object and get ready-to-use typed models in your language of choice: TypeScript interfaces, Go structs (with JSON tags), Rust serde structs, Python dataclasses, Java or C# classes, or Kotlin data classes. Nested objects become their own named types, arrays of objects are merged into a single shape with fields marked optional when they don't appear in every element, and integers are distinguished from floating-point numbers.
Set the root type name to match your model and switch languages from the dropdown. Everything runs locally in your browser — your JSON is never uploaded — which makes it safe for API responses and other sensitive payloads.
Object to types
{ "name": "Ada", "tags": ["dev"], "address": { "city": "NYC" } }export interface Root {
name: string;
tags: string[];
address: Address;
}Switch the language dropdown to emit Go structs, Rust serde, Python dataclasses and more.
Frequently asked questions
Which languages are supported?
TypeScript, Go, Rust (serde), Python (dataclasses), Java, C# and Kotlin. Pick one from the language dropdown and the models regenerate instantly.
How are nested objects and arrays handled?
Each nested object becomes its own named type, and the parent references it. Arrays of objects are merged into one element type; a field missing from some elements is marked optional (or nullable) in languages that support it.
Does it tell integers from floats?
Yes. Whole numbers infer as integer types (int64, i64, long…) and numbers with decimals as floating-point (float64, f64, double…), which matters for typed languages.
Is my JSON uploaded anywhere?
No. The conversion happens entirely in your browser.