RU

JSON to Types Online

Generate typed interfaces from JSON for TypeScript, Go, Python and Rust

json-to-types
JSON
Output

Paste JSON to generate types

TypeScript
Was this tool helpful?
TS

TypeScript

Generate TypeScript interfaces with nested types

Go

Go Structs

Generate Go structs with JSON tags

Py

Python Dataclasses

Generate Python dataclasses with type hints

Rs

Rust Structs

Generate Rust structs with serde attributes

Related Tools

Frequently Asked Questions

Paste JSON into the left panel — TypeScript types are generated automatically. The tool creates interfaces with correct types for all fields, including nested objects and arrays.
Four languages are supported: TypeScript (interfaces), Go (structs with JSON tags), Python (dataclasses with type hints), and Rust (structs with serde attributes).
Nested objects automatically generate separate types/structs. Arrays of objects create typed lists, and arrays of primitives create corresponding collection types.
Yes, use the 'Type name' field in the editor header. The default root type is named Root, but you can set any name you like.