Paste example JSON below and get matching TypeScript interfaces — nested objects become their own named interfaces, arrays become Type[]. Runs entirely in your browser; nothing is uploaded.
Hand-writing TypeScript interfaces to match an API response or config file is tedious and error-prone — it's easy to miss a nested field or get an array type wrong. This tool infers the shape directly from real example data: paste JSON, and every nested object becomes its own named interface (so customer gets a Customer interface, not an inline blob), arrays become Type[], and property names that aren't valid TypeScript identifiers are automatically quoted.
Want to pretty-print or validate the JSON first? Use the JSON Formatter. Comparing two JSON payloads instead? Try the JSON Diff Viewer. Need a formal JSON Schema instead of TypeScript types? Use the JSON Schema Generator.
Real-world API arrays don't always have perfectly consistent objects — some items might have an extra optional field. This tool uses the first element of an array as the representative shape, so a field that only appears on the second or third item won't show up in the generated interface. For anything you're about to ship, double check the output against a few different example items, not just one.
Pretty-print or validate JSON with the JSON Formatter, compare two JSON payloads with the JSON Diff Viewer, or generate a formal schema with the JSON Schema Generator.