CSVSwap

CSV to SQL Converter

Generate a CREATE TABLE statement and INSERT statements from a CSV file.

or paste data

Your data stays on your device. The conversion runs in your browser and nothing is uploaded.

How to use the CSV to SQL converter

  1. Drop your CSV or paste it.
  2. Type the table name you want.
  3. Click Convert and run the SQL in your database.

What to know

Questions

Which databases does it work with?

The statements use standard SQL with double-quoted column names, which works in PostgreSQL, SQLite and most others. For MySQL, run SET sql_mode = ANSI_QUOTES first.

Related tools