CSV to SQL Converter

Turn a CSV file into CREATE TABLE and INSERT statements for PostgreSQL, MySQL, SQL Server, Oracle or SQLite. Free, in your browser.

How to use the CSV to SQL Converter

Generate CREATE TABLE and INSERT statements from sample data.

  1. Load sample data
  2. Review the column types
  3. Pick a database and copy

Tips

Example

Input: id,name 1,Ada

Output: CREATE TABLE t (id INT, name TEXT); INSERT INTO t VALUES (1, 'Ada');

Frequently asked questions

How do I convert a CSV to SQL?

Upload the CSV, pick your database and copy the CREATE TABLE and INSERT statements.

Are column types detected?

Yes. Types are guessed from your data, and you can check them before you run the script.

Does it connect to my database?

No. It only writes the SQL for you to run yourself.

Guides