Paste any JSON payload and get clean, ready-to-use TypeScript interfaces. Runs entirely in your browser — nothing is uploaded.
Paste a JSON object or array on the left and KB Cafe walks the structure to produce
matching interface declarations on the right. Nested objects become their own
named interfaces, arrays are typed by their elements, and mixed primitives collapse into
union types like string | number. It all happens in your browser — no request
is ever sent, so it is safe to paste API responses or config you would rather not upload.
interface; nested objects get a named child interface based on the key.[1, 2] is number[], and an array of objects merges their keys (missing keys become optional).… | null rather than guessing.unknown[] and Record<string, unknown> so nothing is silently wrong.
Given a coffee record with an origin object and a list of reviews,
you get a root interface plus an Origin and Review
interface — drop them straight into your .ts file. Click load sample
above to try it.
No. The converter is plain JavaScript that runs on this page. Your input never leaves your browser, which is why it works offline once the page has loaded.
??When an array contains objects that don’t all share the same keys, the keys that are missing from some elements are marked optional. You can also force every field optional with the toggle above.
Yes — nesting is unlimited. Each distinct object shape becomes its own interface, named after the key that holds it.
Reading an API token alongside your JSON? Try the JWT decoder. Scheduling a job that emits this payload? See the cron generator.