ilovekit

JSON to TypeScript

12 tools

Generate a TypeScript interface from JSON.

Runs in your browser — your files and text stay on your device

Everything you'd need a dedicated JSON app for — formatting, a collapsible tree view, structural diffing, converting to/from CSV, YAML, and XML, generating TypeScript interfaces and JSON Schemas, querying with JSONPath, and validating JSON Lines — runs entirely client-side using your browser's native JSON engine, so nothing you paste is ever sent to a server.

Format & ValidateTree ViewJSON DiffJSON → CSVJSON ↔ YAMLJSON ↔ XML→ TypeScriptSchema GeneratorSchema ValidatorJSONPath TesterSort KeysJSON Lines
TypeScript

How to use this tool

  1. 1Paste a sample JSON payload — e.g. an API response.
  2. 2A matching TypeScript interface is generated automatically, with nested objects as separate interfaces.
  3. 3Copy it into your project.

Frequently asked questions

How are nested objects handled?

Each nested object gets its own named interface (based on its key), referenced from the parent — matching how you'd typically structure hand-written types.

What if a field could be more than one type?

The generator infers a type from the single sample value provided — it can't detect that a field might sometimes be null or a different type unless your sample shows that case.

Is my JSON uploaded anywhere?

No, the interface is generated entirely in your browser.

Guides

All guides →