CSV to SQL INSERT
Convert CSV rows to SQL INSERT statements. Choose your table name, database dialect, and batch size — free, browser-based, no uploads.
Table name
CSV delimiter
Dialect
Rows per INSERT
CSV Input (first row = column headers)
How to convert CSV to SQL INSERT
- Paste your CSV data or upload a .csv file.
- Enter the target table name.
- Choose the delimiter and SQL dialect for your database.
- Set the batch size — how many rows per INSERT statement.
- Click Generate SQL INSERT, then copy or download the result.
How values are typed
The generator auto-detects integers, floats, booleans (true/false), and empty/null values — these are output without quotes. All other values are wrapped in single quotes with single-quote characters escaped as '' (SQL standard escape). Column names are quoted using the dialect-appropriate quoting character.
Privacy — processed in your browser
All conversion runs in your browser. Your CSV data is never sent to any server — making it safe for internal data and database records.
Frequently Asked Questions
What is the batch size setting?
Some databases perform better with multiple rows in a single INSERT VALUES statement. Setting batch size to 100 means 100 rows per INSERT statement, which is efficient for most databases. Set to 1 for one INSERT per row.
How are column names quoted?
MySQL uses backticks (`col`), PostgreSQL uses double quotes ("col"), SQL Server uses square brackets ([col]), and SQLite uses backticks. This prevents conflicts with reserved keywords.
Can I use a semicolon or tab as delimiter?
Yes — use the delimiter selector to choose comma, semicolon, or tab. Tab-separated (TSV) files are also supported.