WHAT IT DOES
Turn the sample response into the types that have to receive it.
Paste one JSON value or an array of representative objects and choose TypeScript, Go, or Python. The tool walks the observed structure, gives nested objects stable names, merges array samples, marks fields that are absent from some samples as optional, and preserves nullability and mixed values where the target can express them. It generates only what the sample establishes and reports the places where a real contract may need a broader type.
Why use it?
Use representative API responses to draft types, then review what the examples could not establish. A successful response alone says nothing about error payloads or missing fields.
How to use this tool
- Paste a JSON sample or an array containing several representative records.
- Choose TypeScript, Go, or Python and generate the types.
- Include a record with a missing field and another with null to inspect optionality and nullability. Review empty arrays, mixed types, and generated names before integrating the declarations.
Details and limitations
- Arrays of objects are treated as multiple observations, so a key missing from one item becomes optional instead of being silently declared universal.
- TypeScript uses interfaces and unions, Go uses structs with JSON tags and falls back to any for mixed types, and Python uses TypedDict with NotRequired fields.
- Empty arrays cannot reveal their element type, and the generated output says so rather than inventing a plausible element model.