CSV → SQL INSERT Generator
Paste tabular data and the tool builds INSERT statements ready for any database. Pick the SQL dialect (Standard, MySQL, PostgreSQL, SQLite) for the right identifier quoting, toggle multi-row INSERT for compact output, and let the tool infer types so numbers and booleans go in unquoted. Handles quoted CSV cells, header detection, and auto-delimiter detection.
INSERT INTO "users" ("id", "name", "role", "joined", "score", "active") VALUES (1, 'Alice', 'Engineer', '2024-01-15', 87.5, TRUE);
INSERT INTO "users" ("id", "name", "role", "joined", "score", "active") VALUES (2, 'Bob', 'Designer', '2023-08-22', 92.0, TRUE);
INSERT INTO "users" ("id", "name", "role", "joined", "score", "active") VALUES (3, 'Carol', 'PM', '2025-03-04', 79.3, FALSE);How to use
- Paste CSV / TSV / pipe / semicolon data.
- Set the table name and SQL dialect.
- Toggle multi-row INSERT and type inference as needed.
- Copy the SQL into your migration / seed file.
Frequently asked questions
- What's multi-row INSERT?
- Instead of one INSERT statement per row, multi-row produces a single INSERT with all VALUES tuples. It's much faster for bulk loads but harder to read.
- How does type inference work?
- Integers (123), decimals (1.5), TRUE/FALSE, and NULL go in unquoted. Everything else is treated as a string and wrapped in single quotes with proper escaping.
- Will it inject SQL?
- Quotes inside strings are doubled ('it''s safe'), which is the standard SQL escape. Don't rely on this for untrusted data — use parameterized queries in production code; this tool is for seed data and migrations.
- Why is identifier quoting different per dialect?
- MySQL uses backticks (`col`), PostgreSQL and SQLite use double quotes ("col"), and Standard SQL (SQL-92) also uses double quotes. The tool picks the right one so the output runs on your target DB.
Guides on this topic
Related tools
JSON → SQL INSERT
Turn a JSON array of objects into INSERT statements — PostgreSQL, MySQL, SQLite, or ANSI quoting, with an optional ON CONFLICT upsert tail.
Mock Data Generator
Generate realistic fake records for testing — names, emails, dates, IDs, lorem — exported as JSON, CSV, or SQL INSERTs.
HTML Table to CSV Converter
Extract HTML <table> data into CSV, TSV or semicolon-separated rows, in your browser.
CSV ↔ TSV ↔ Pipe Converter
Switch delimited text between CSV, TSV, pipe, and semicolon — with proper RFC-4180-style quoting and auto-detection.
Markdown Table Generator
Paste CSV, TSV, or pipe-delimited data and get a properly aligned GitHub-flavored Markdown table.
CSV to Excel (XLSX) Converter
Turn CSV or TSV into a real .xlsx file in your browser, with leading zeros, long IDs and codes like SEPT1 kept exactly as typed.