CSV to SQL Converter

Turn CSV rows into SQL INSERT statements for your table.

100% private. Everything runs in your browser. Your data never leaves your device.

CSV to SQL

What does this tool do?

This tool converts CSV rows into SQL INSERT statements for a table name you choose. Perfect for seeding a database from a spreadsheet. Runs entirely in your browser.

How to use CSV to SQL - Free Online Tool

  1. Paste CSV or upload a file, or click "Try with sample data".
  2. Enter the target table name.
  3. Click Generate.
  4. Copy or download the SQL INSERT statements.

Example

CSV to SQL:

Before

CSV
name,age
Ali,30

After

SQL
INSERT INTO t (name,age) VALUES ('Ali','30');

Each row becomes an INSERT statement.

Excel formula alternative

Prefer a formula? You can achieve a similar result with manual concatenation:

="INSERT INTO t VALUES ('"&A2&"');"

Building SQL with Excel formulas is error-prone. This tool escapes values and generates clean statements.

When should I use this tool?

Seeding a database from a CSV
Migrating spreadsheet data
Bulk inserts for testing
Generating fixtures
Loading reference data
Quick DB imports

Frequently Asked Questions

Yes, single quotes in values are escaped so the SQL is valid.

Yes, enter any table name for the INSERT statements.

No, it runs in your browser.

Standard INSERT syntax that works with MySQL, PostgreSQL, and SQLite for typical data.