Convert JSON to SQL
Turn a JSON array of objects into SQL: the tool infers column types, builds a CREATE TABLE statement and INSERT statements for every row. Paste JSON — copy the SQL.
Output · 2 × 4
CREATE TABLE "my_table" (
"id" INTEGER,
"name" TEXT,
"age" INTEGER,
"active" BOOLEAN
);
INSERT INTO "my_table" ("id", "name", "age", "active") VALUES
(1, 'Alice', 30, TRUE),
(2, 'Bob', NULL, FALSE);Frequently asked questions
How do I convert JSON to SQL?
Paste a JSON array of objects, set the table name, and copy the generated CREATE TABLE and INSERT statements.
How are column types inferred?
From the values: integers become INTEGER, decimals REAL, booleans BOOLEAN, everything else TEXT. Mixed or null values fall back to TEXT.
Does it work for a single object, not an array?
Yes — a single object is treated as a one-row table.