Tools/JSON to SQL DDL Schema Generator
100% Client-Side • In-Browser Privacy

JSON to SQL DDL Schema Generator

Generate PostgreSQL or MySQL CREATE TABLE DDL statements from JSON object keys with automatic column typing.

Input JSON

How type generation works

The generator parses your JSON into a value tree, then builds an intermediate schema. Each object becomes a named interface derived from its key, so profile yields a Profile type. Arrays are reduced to a single element type by merging every element: an array of objects merges key by key, and any key missing from one row is marked optional. Mixed primitive arrays become a union. null values make a field optional or nullable, and integers are separated from floating-point numbers so languages like Go, Rust, and Python receive exact integer or float types. All definitions are emitted in valid compilation order.

Explore Related Data & Format Tools

All tools →

Frequently Asked Questions