JSON to TypeScript Interfaces
Paste a JSON blob and get TypeScript interface declarations. Handles nested objects, arrays, and union types. Runs in your browser.
Runs 100% in your browser — nothing is uploaded.
TypeScript (3 interfaces)
Frequently asked
How does it handle arrays of mixed types?
It creates a union: Array<string | number> for a mixed array. If all elements share the same shape, you get T[] for that T.
What about optional fields?
The tool assumes every field is required based on the example JSON. If your real data sometimes omits fields, mark them optional (?:) manually — one common enhancement to add later.
Nested interface names?
Named after the JSON key in PascalCase. "user.profile" becomes interface Profile. Duplicate names re-use the same interface.
Related tools
- JSON FormatterFormat, validate, and minify JSON in your browser. See parse errors with line/co
- JSON String EscapeEscape any text for safe embedding as a JSON string, or unescape a JSON string b
- JSON ↔ YAML ConverterConvert between JSON and YAML in either direction. Handles nested objects, array
- Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal. Supports huge n
- Cron BuilderPick a preset or enter your own fields to build a cron expression. Includes a pl
- CSS Beautifier & MinifierBeautify minified CSS with proper indentation, or minify pretty CSS to a single