Convert JSON to {language} Instantly
Generate {language} classes, interfaces, and types from JSON. Perfect for quickly integrating API responses into your {language} projects.
Paste a JSON sample and get accurate TypeScript interfaces — with optional fields, union types, and nested shapes inferred automatically.
Generate {language} classes, interfaces, and types from JSON. Perfect for quickly integrating API responses into your {language} projects.
Runs entirely in your browser — no upload, no wait.
Your JSON never leaves the tab. Nothing is logged.
Free, unlimited, no account required.
Hand-typing interfaces from API responses is error-prone and quickly goes stale. Generating from a real sample produces types that match production exactly, with sane defaults for optional fields and unions.
The generator walks every value, infers the narrowest type, and merges array element types into a union. Fields that appear in some array elements but not others are marked optional. Numbers are kept as number; null values become T | null.
// From
[{"id": 1, "name": "Ada"}, {"id": 2, "name": "Bo", "role": "admin"}]
// To
interface Item {
id: number;
name: string;
role?: 'admin';
}Toggle: PascalCase vs camelCase, interface vs type alias, readonly modifiers, exact optional types, root name. Multiple samples can be merged into a single union for tagged-union shapes.
Empty arrays generate unknown[] with a warning. Mixed-type arrays (string and number) become unions. Numeric keys produce Record<string, T> with a comment explaining the choice.
All generation runs locally. Your sample JSON never leaves the browser.