JSON Formatter
Format, pretty-print, and validate JSON in your browser.
Generate TypeScript interface or type definitions from JSON. Handles nested objects, arrays, and null values.
This tool generates TypeScript interface or type definitions from JSON — perfect for quickly typing API responses, configuration files, or any JSON data structure.
Nested objects are expanded into separate named interfaces, arrays are typed from their element types, and all generated interfaces are output in dependency order so the result is ready to use immediately.
Each nested object is converted into its own named interface and referenced from the parent type. Interfaces are output in dependency order so the result can be pasted directly into a TypeScript file.
The tool inspects all elements in the array and unifies their types. For arrays of objects, all keys across all elements are merged into a single interface.
Yes. You can paste JSON copied directly from your browser's developer tools or from an API response body.
The output is shown in a read-only textarea. Use the "Copy" button to copy it to the clipboard, then paste and edit it in your editor.