← ToolsConverters
JSON to TypeScript.
Infer TypeScript interfaces from JSON, with optional Zod schemas. Interface or type-alias output.
export interface RootAddress {
city: string;
zip: string;
}
interface Root {
id: number;
name: string;
tags: string[];
address: RootAddress;
active: boolean;
score: number;
}🔒 Privacy — runs 100% locally
No uploads · no cookies · works offline after load. View Source if you don't believe it.
How to use.
- Paste JSON — interfaces infer live.
- Toggle interface/type, readonly, or switch to Zod for runtime schemas.
- Copy into your codebase (export keyword included).
Related tools.
Formatters
JSON formatter
Pretty-print, minify and validate JSON with exact error pointers. Pasted text never leaves this tab.
Converters
JSX to HTML
HTML to JSX is near-lossless; JSX to HTML covers presentational components. Includes a live render check.
Formatters
HTML / CSS formatter
Tidy indented markup or minify it for shipping. Handles inline CSS and void elements.
FAQ.
How are optional fields handled?
Conservatively — every observed key is required. Delete or add ? where your API is actually optional.
Empty arrays?
They infer as unknown[] since there's nothing to learn from — fill in the element type manually.