Paste a JSON response and get typed code to use it safely: TypeScript interfaces, Go structs with json tags, or Python dataclasses. Nested objects become their own types and fields missing from some items are marked optional.
loading toolHow to use the json to typescript, go and python
- Type or paste your input.
- Pick the options; the result updates as you type.
- Copy or download the result.
Good to know
- Paste a response with several items in each list: the more examples, the better the types.
- Go names follow Go style: user_id becomes UserID.
Questions
How are optional fields found?
In a list of objects, a key that is missing from some items is marked optional (? in TypeScript, omitempty in Go, Optional[…] = None in Python).
What happens with null values?
A field that is null in your sample cannot reveal its real type, so it becomes unknown (TypeScript), interface{} (Go) or Any (Python). Add a sample with a real value for a better result.
Is my data private?
Yes. Everything happens inside your own browser: nothing you type or choose is uploaded to us or anyone else.
Is it free?
Completely free, with no sign-up, no watermark and no limit on how many times you use it. Light ads keep the site running.





























