About CSV to SQL

CSV to SQL reads a CSV and writes the SQL to load it: an optional CREATE TABLE with guessed column types, then INSERT statements in batches.

Numbers pass through unquoted, empty cells become NULL, and strings are quoted and single-quote-escaped. Identifier quoting follows the dialect you pick. It runs in your browser.

How to use it

  1. Paste your CSV.
  2. Set the table name and pick a SQL dialect.
  3. Copy the SQL or download it as a .sql file.

Common questions

How are column types decided?

Every value in a column is checked. All integers gives an integer type, integers and decimals gives a numeric type, all true or false gives a boolean, and anything else is text.

Which dialects are supported?

ANSI, MySQL, PostgreSQL, and SQLite. They differ in identifier quoting and in how booleans and decimals are written.

Can I skip the CREATE TABLE?

Yes. Untick CREATE TABLE to get only the INSERT statements.

Is my data uploaded?

No. The conversion runs in your browser.