HomeCSV ToolsCSV → SQL

Convert CSV to SQL INSERT Statements

Upload a CSV and generate SQL INSERT statements ready to paste into your database. Free, no signup required.

What this tool does

Stop writing INSERT statements by hand. Upload your CSV, enter your table name, and Tabular generates a complete SQL script with one INSERT per row. Works with MySQL, PostgreSQL, SQLite, and any SQL database.

Problems it solves

  • Seeding a database with data from a spreadsheet
  • Migrating data from a CSV export into a SQL table
  • Creating SQL fixtures for test environments
  • Populating a new table from a CRM or analytics export
  • Batch-inserting lookup table data from a CSV

Example

Each CSV row becomes a ready-to-run SQL INSERT statement.

Before

nameemailplan
Alicealice@example.comPro
Bobbob@example.comFree

After

INSERT INTO `data` (`name`, `email`, `plan`) VALUES ('Alice', 'alice@example.com', 'Pro');
INSERT INTO `data` (`name`, `email`, `plan`) VALUES ('Bob', 'bob@example.com', 'Free');

Frequently asked questions

Which SQL databases does the output work with?

The generated SQL uses backtick-quoted identifiers and single-quoted string values, which is compatible with MySQL, MariaDB, SQLite, and most other SQL databases. PostgreSQL users may need to replace backticks with double quotes.

Can I set the table name?

Yes. Enter your table name in the Table name field before running the job. The default is 'data'.

Is this free?

Yes. CSV to SQL conversion is available on the free plan for files up to 5 MB.

Are special characters in values handled correctly?

Yes. Single quotes and backslashes in cell values are properly escaped in the output.