About CSV to SQL
This tool converts CSV into SQL INSERT statements for a table you name, with an optional CREATE TABLE. It is handy for importing spreadsheet or exported data into a database. It runs in your browser, so your data is never uploaded.
How CSV to SQL works
How to use it
- Paste your CSV and enter the table name.
- Choose whether to include CREATE TABLE and a header row.
- Copy the generated SQL.
How it works
It parses the CSV (handling quoted fields and commas inside quotes), uses the header for column names, and builds one INSERT per row. Numbers are left unquoted, empty cells become NULL, and text is escaped for SQL.
Common uses
- Import CSV into a database
- Generate INSERT statements
- Seed a table with data
- Migrate spreadsheet data
- Create a CREATE TABLE from CSV
- Prepare a SQL import
- Convert exported data
- Bulk-insert rows
Frequently asked questions
How do I convert CSV to SQL?
Paste CSV, name the table and copy the generated INSERT statements.
Does it create the table?
Optionally — tick Include CREATE TABLE.
Is text escaped safely?
Yes — single quotes are escaped for SQL.
Are numbers quoted?
No — numeric values are inserted unquoted.
Is my data uploaded?
No — it converts in your browser.
Which databases does it suit?
Standard SQL works for MySQL, PostgreSQL, SQLite and more.
Is it free?
Yes — completely free with no sign-up.