Generate SQL CREATE & INSERT from CSV
PG / MySQL / SQLiteGenerate typed PostgreSQL, MySQL, or SQLite CREATE TABLE and batched INSERT SQL scripts from CSV datasets locally—zero database uploads.
or drop a text or data file here · Ctrl V to paste · or drop a .csv file · Ctrl V to paste CSV
- 100% browser-local
- 0 bytes uploaded
- PostgreSQL / MySQL / SQLite
Instant Before & After Preview
id,sku,price,in_stock
1,KB-900,129.99,true
2,MS-210,49.50,true
3,HD-4K,299.00,falseCREATE TABLE IF NOT EXISTS "imported_data" (
"id" INTEGER,
"sku" TEXT,
"price" DOUBLE PRECISION,
"in_stock" BOOLEAN
);
INSERT INTO "imported_data" ("id", "sku", "price", "in_stock") VALUES
(1, 'KB-900', 129.99, TRUE),
(2, 'MS-210', 49.50, TRUE),
(3, 'HD-4K', 299.00, FALSE);Source vs. target format specification comparison: CSV → SQL
| Property | Source: CSV | Target: SQL |
|---|---|---|
| Structure type | Tabular | Typed Code |
| Human readability | High | High |
| Nesting support | No | No |
| LLM token efficiency | High | Low |
| File extension | .csv | .sql |
| MIME type | text/csv | application/sql |
| Best for | Spreadsheet imports, analytics exports, SQL table loads, and uniform flat datasets. | Database seeding scripts, schema migrations, and bulk INSERT imports across PostgreSQL, MySQL, and SQLite. |
How it works
How to generate SQL scripts from CSV locally
Infer column types, quote dialect identifiers, and emit batched INSERT INTO statements without exposing raw rows.
- Paste or drop CSVProvide a CSV with column headers in row 1.
- Select SQL dialect & tableChoose PostgreSQL, MySQL, or SQLite, set your table name, and pick INSERT batch size.
- Run SQL scriptCopy or download the .sql seed file ready for psql, mysql, or sqlite3.
FAQ
Frequently asked questions
How are column types inferred for CREATE TABLE?
TxtTo scans sample values across every column to choose INTEGER, DOUBLE PRECISION / REAL, BOOLEAN, or TEXT automatically.
Does MySQL dialect use backticks instead of double quotes?
Yes. Choosing MySQL quotes table and column identifiers with backticks (`imported_data`), while PostgreSQL and SQLite use double quotes.
Are empty cells emitted as SQL NULL?
Yes. Blank values map cleanly to NULL instead of empty strings where appropriate, and single quotes inside text are escaped as ''.