Table names and columns
Use the table name field for the INSERT target. Header rows become column names, or you can enter custom columns when the CSV has no header row.
Paste or upload CSV and generate clean SQL INSERT statements locally for PostgreSQL, MySQL, SQL Server, SQLite, and generic SQL.
Paste CSV, upload a file, or load a sample to begin.
Quoted values, escaped quotes, multiline fields, CRLF, LF, and delimiter detection are supported.
Generated SQL text only. Review it carefully before running it in a database.
Paste CSV on the left, set the table name and dialect, then generate SQL text.
CSV to SQL guide
This generator turns tabular CSV into SQL INSERT statements for seed data, test fixtures, small migrations, and reproducible database examples. It creates text only and never connects to a database.
Use the table name field for the INSERT target. Header rows become column names, or you can enter custom columns when the CSV has no header row.
One INSERT per row is easy to diff and debug. Multi-row INSERT output is shorter and can be split into batches for larger files.
Identifier quoting follows the selected dialect: double quotes for PostgreSQL, SQLite, and generic SQL, backticks for MySQL, and brackets for SQL Server.
Empty CSV cells can become NULL. Simple numbers and booleans can be emitted as SQL literals, while date-like values stay quoted strings by default.
String values are wrapped in single quotes and embedded single quotes are escaped by doubling them, which is the common SQL string literal convention.
Generated SQL is not database-validated. Review table names, column order, permissions, constraints, duplicate keys, and transaction behavior before running it.
No. It only generates SQL text in your browser. It does not connect to any database or validate statements against a live schema.
By default, empty values become NULL. You can turn that off to emit empty strings instead.
Enable identifier quoting when table or column names contain spaces, hyphens, reserved words, or mixed casing you need to preserve.
The tool has a browser processing limit and pauses auto-generation for larger input. For huge imports, use database-native bulk import tools after reviewing the CSV.