CSV to SQL INSERT Generator
Paste CSV with a header row, name the table, and get INSERT statements.
About this tool
Paste CSV with a header row and you get one INSERT per row, or a single multi-row INSERT if you prefer (split into batches of 500 rows, since SQL Server won't accept more than 1,000 rows in one VALUES list). The CSV is read properly: fields in double quotes can contain commas, line breaks and doubled quotes (""), and the separator (comma, semicolon, tab or pipe) is detected automatically, so CSV exported from Excel in Europe with semicolons works too.
Text is quoted with apostrophes escaped (O'Neill becomes 'O''Neill'). Plain numbers are left unquoted, but numbers with a leading zero, such as phone numbers or 007, stay as text, so the zeros aren't lost. Empty fields become NULL unless you switch that off, and a value that was in quotes in the CSV is always treated as text. Column names that contain spaces or symbols are quoted in the chosen database's style.