JSON to SQL Table
Turn a sample JSON object into a CREATE TABLE statement with inferred types.
Draft a table from JSON
When you have a sample API response and need a database table for it, hand-writing the CREATE statement is tedious. This tool infers a schema from your JSON and produces a CREATE TABLE you can refine.
A record with an integer id, a string name, a boolean active flag, and a decimal score becomes a table with INTEGER, TEXT, BOOLEAN, and REAL columns. Pass an array and it reads the first object as the template.
A starting point, kept private
It infers types in your browser and never uploads your data. Review the types against your database engine before running the statement.
Frequently Asked Questions
How are column types inferred?
From the values in your sample: numbers become INTEGER or REAL, true/false becomes BOOLEAN, and everything else becomes TEXT.
Can I pass an array?
Yes — for an array of objects it uses the first object as the schema, which is the common case for API sample data.
Which SQL dialect?
A portable, standard style that works with most databases; adjust the types to match your specific engine if needed.
Browse the full set of free, private, in-browser tools.