CSV to SQL help

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.

Steps

  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.

Everything runs in your browser. Nothing you enter or drop is uploaded.

Back to CSV to SQL