iziznkit

JSON to TypeScript & Go

Free · no sign-up

Paste JSON and get typed TypeScript interfaces or Go structs — inferred in your browser.

Paste a JSON sample and get ready-to-use TypeScript interfaces or Go structs. The types are inferred in your browser — nested objects become their own named types, and arrays of objects are merged into one shape with optional fields where keys are missing. Nothing is uploaded.

  • ✓TypeScript interfaces or Go structs
  • ✓Named types for nested objects
  • ✓Merges arrays of objects, marks optional fields
  • ✓Go output includes json struct tags
  • ✓Runs in your browser — nothing uploaded

Who it's for

  • Typing an API response
  • Scaffolding a Go struct from a payload
  • Turning a config sample into types
  • Sharing a data shape with your team

How it works

  1. 1Paste a JSON object or array.
  2. 2Pick TypeScript or Go.
  3. 3Name the root type if you like.
  4. 4Copy the generated types.

Frequently asked questions

How does it handle arrays of objects?+

It merges every element into one type. A key that appears in some elements but not all becomes optional (a `?` field in TypeScript, `omitempty` in Go).

Does it know int vs float in Go?+

Yes — a whole number becomes `int` and a decimal becomes `float64`. If an array mixes both, it uses `float64`.

What about null values?+

A null becomes `null` in TypeScript and `interface{}` in Go, since the real type can't be inferred from null alone.

Is my JSON uploaded?+

No. The types are generated entirely in your browser; your data never leaves your device.

You may like

Some links may be partner links — how this works