CSV → SQL Insert Generator
Turn CSV data into batched INSERT statements for MySQL, PostgreSQL, SQLite, or SQL Server.
About this tool
The CSV → SQL Insert Generator parses CSV data — pasted or typed, first row as header — and produces ready-to-run INSERT statements for four SQL dialects: MySQL, PostgreSQL, SQLite, and SQL Server. This is the tool for seeding a test database from a spreadsheet export, migrating a small dataset without writing an ETL script, or quickly turning a CSV a stakeholder emailed you into rows you can paste directly into a SQL client.
Set a table name, pick a dialect — this mainly changes identifier quoting: backticks for MySQL, double quotes for PostgreSQL and SQLite, square brackets for SQL Server — and a batch size controlling how many rows go into each INSERT statement. A preview table shows the first 5 parsed rows before you generate SQL, so you can catch a wrong delimiter or misaligned header before generating thousands of lines.
Values are escaped for safety: single quotes inside strings become doubled single quotes, and values that look like plain integers or decimals are emitted unquoted as numeric literals. An "use NULL for empty cells" toggle lets you choose whether blank CSV cells become SQL NULL or empty strings. Parsing uses PapaParse entirely in your browser.
