CSV to SQL Converter
Generate SQL INSERT statements from CSV data.
Identifiers and values are quoted for the selected dialect. Backslashes are escape characters in MySQL but literal in standard SQL, so picking the wrong dialect can corrupt data — review the output before running it.
Overview
This tool converts CSV data into one INSERT statement per row — useful for
seeding a development database, migrating a spreadsheet export, or building
test fixtures without writing a script. Column names come from the CSV header
(or are auto-named col1, col2, … when there is no header).
How to use
- Set the target table name in the Table field.
- Check First row is header if your CSV’s first line contains column names; uncheck it to treat every line as data.
- Paste your data into the CSV area — the SQL output regenerates as you type.
Examples
- Input
id,name,active/1,Alice,true→INSERT INTO `my_table` (`id`, `name`, `active`) VALUES (1, 'Alice', 'true'); - A field like
O'Brienis escaped to'O''Brien'; an empty field becomesNULL.
Notes
The generator emits INSERT statements only — create the table yourself first.
Booleans like true/false are treated as strings, and numbers are detected by
pattern (-?digits[.digits]), so review the output before running it against a
real schema.