Convert JSON to type definitions in Python, TypeScript, Java and many other languages
JSON to Types converts a JSON object into type definitions or schemas for various programming languages. Instead of manually writing interfaces or classes from an API response, you paste the JSON and instantly get the corresponding type definition.
Our tool supports 11 languages: Python (dataclasses with Optional typing), TypeScript (interfaces), Go (structs with JSON tags), Rust (structs with serde), Kotlin (data classes), Swift (Codable structs), Java (POJOs), C# (classes with JsonProperty), Zod (runtime validation schemas), GraphQL (SDL types), and SQL (CREATE TABLE statements).
Use the All Nullable toggle to make every field optional across all levels. For finer control, expand the Nullable fields section to individually mark specific keys as nullable. The type output updates in real-time as you toggle fields.