SQL Output
SQL output will appear here
Paste JSON on the left to generate SQL (CREATE + INSERT). Or load sample data to see a demo.
Try JSON to SQL with sample input
Paste JSON on the left to generate SQL (CREATE + INSERT). Or load sample data to see a demo.
Try JSON to SQL with sample input
Paste JSON on the left, choose a SQL dialect, then copy or download the generated CREATE TABLE + INSERT.
Paste your JSON into the editor. If you want a quick demo, click “Sample”.
[
{
"id": 1,
"name": "Alice",
"email": "[email protected]",
"active": true,
"age": 28,
"meta": { "plan": "pro", "region": "US" }
},
{
"id": 2,
"name": "Bob",
"email": "[email protected]",
"active": false,
"age": 31,
"meta": { "plan": "free", "region": "CN" }
}
]Choose a SQL dialect (PostgreSQL/MySQL/SQLite). The generated SQL will appear on the right panel as you type.
-- Dialect: postgres
CREATE TABLE "data" (
"id" INTEGER NOT NULL PRIMARY KEY,
"name" TEXT,
"email" TEXT,
"active" BOOLEAN,
"age" INTEGER,
"meta" JSONB
);
INSERT INTO "data" ("id", "name", "email", "active", "age", "meta") VALUES
(1, 'Alice', '[email protected]', TRUE, 28, '{"plan":"pro","region":"US"}'),
(2, 'Bob', '[email protected]', FALSE, 31, '{"plan":"free","region":"CN"}');
Use “Copy” to copy SQL to your clipboard, or “Download” to save it as a .sql file.
Common questions about converting JSON to SQL
Format, validate and process JSON
Export to other popular formats
Convert to JSON from other types
Generate code from JSON data
Format and beautify other code formats