CSV to SQL INSERT Generator
Generates INSERT statements from delimited rows, quoted for the dialect you pick.
Loading the tool…
How to use this tool
- Paste the CSV extract.
- Type the target table name and choose the database dialect.
- Set rows per statement above one if you want batched inserts.
- Generate the statements, then review them against the real table before running them.
What csv to sql insert does
Loading a small extract into a database is a routine job that is fiddly to do by hand. This generator writes one INSERT per row, or batches several rows into a single statement, and quotes both identifiers and string literals for the dialect you choose. Single quotes inside values are doubled, which is what stops an apostrophe in a surname from terminating the string early.
What it deliberately does not do is guess your column types. It writes bare numbers where a value looks numeric and quoted strings everywhere else, which is correct for a table whose columns are already the right type, and wrong for one where a numeric-looking code needs to stay text. Review the generated statements against the target table before running them, particularly for identifiers, dates and anything with a leading zero.