JSON to TypeScript, C#, Go and Python

Generate TypeScript interfaces, C# records, Go structs or Python dataclasses from a JSON sample, with nested types inferred.

About json to typescript, c#, go and python

Paste a representative API response and get a type definition back. Nested objects become their own named types, arrays are inspected to infer their element type, and a field that is null in the sample is widened to be nullable.

Names are derived from the property they came from, converted to the target language's convention: `PascalCase` for C# types and Go structs, `camelCase` for TypeScript members.

Frequently asked

How are mixed-type arrays handled? If the elements do not agree on a single type, the element type widens to `unknown` in TypeScript, `object` in C#, and `any` in Go, so you can narrow it deliberately.