JSON to SQL Schema
Infer a SQL CREATE TABLE statement from a JSON object or array.
$json input
0 chars1 lines
$create table statement[READY]
0 chars1 lines
Related Tools
FAQ
- How are JSON types mapped to SQL types?
- String → VARCHAR(255), integer number → INT, decimal number → FLOAT, boolean → BOOLEAN, null → nullable VARCHAR(255), nested object or array → JSON column.
- Can I paste a JSON array?
- Yes. When you paste an array, the tool uses the first element (or merges keys from all elements) to determine the column set and types.
- Are nested objects supported?
- Nested objects and arrays are mapped to a JSON column type rather than separate tables, keeping the output simple and immediately usable.
Paste a JSON object or array and get a ready-to-use CREATE TABLE statement. Types are inferred automatically: strings become VARCHAR(255), numbers become INT or FLOAT, booleans become BOOLEAN, null fields are marked nullable, and nested objects are stored as a JSON column.