Skip to main content
Code Generators

JSON → TypeScript

Generate TypeScript interfaces from JSON directly in your browser.

Your data stays in your browser.

Generator options
Tool guide

About the TypeScript generator

Infer TypeScript interfaces and types from a representative JSON sample.

What it infers

  • Nested objects become named interfaces.
  • Arrays merge the observed element shapes.
  • Missing properties in merged object samples become optional.
  • Null values are represented as nullable unions.
  • Property names can stay unchanged or be converted to camelCase.

How to use it

  1. Paste representative JSON, including the variations you need the type to cover.
  2. Set the root type name and naming preference.
  3. Generate and review the TypeScript before using it in a project.

Notes

Inference reflects only the supplied sample. Date-like strings remain string types, and mixed samples may produce unions or unknown where a single safe type cannot be inferred.

Privacy

Schema inference and code generation happen locally in your browser. The JSON sample is not uploaded.