ToolVaults

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