CSV to SQL Converter
Turn a CSV into ready-to-run SQL INSERT statements. Set your own table name, choose MySQL, PostgreSQL, SQLite or SQL Server, and get statements with values safely quoted and numbers left bare. Optionally add a CREATE TABLE and batch the rows.
A CSV to SQL converter turns a spreadsheet export into ready-to-run INSERT statements. Add your CSV, set the target table name, and pick MySQL, PostgreSQL, SQLite or SQL Server, so it works to convert CSV to SQL inserts or load a CSV into a database. Numbers are left bare while text is quoted and escaped, so a name like O'Hara does not break the statement, and you can add a CREATE TABLE too. It all runs in your browser.
Read the guide: How to Convert CSV to SQLEverything runs on your device. Files never leave your browser.
How it works
- 1
Add a CSV file
Paste CSV text or drop in a .csv file. The first row is read as the column names.
- 2
Set the table and dialect
Type the target table name and pick your database. Choose one statement per row or a single batched insert.
- 3
Copy the SQL
Copy the generated INSERT statements straight into your client, migration or script.
Instant & 100% private — nothing is uploaded
Everything runs locally in your browser. Your files are processed on your own device and are never sent to a server, so there are no upload waits, no size limits from us, and nothing is ever stored or logged.
Frequently asked questions
- Which databases does the SQL work with?
- You can target MySQL, PostgreSQL, SQLite or SQL Server, and a standard quoting mode for anything else. The difference is mainly how table and column names are quoted, with backticks for MySQL and brackets for SQL Server, so the statements run without edits in your client.
- How are text and numbers handled?
- Values that look like plain numbers are written without quotes so they land in numeric columns, while text is wrapped in single quotes with any apostrophes safely escaped. That keeps a name like O'Hara from breaking the statement.
- Can it create the table too?
- Yes. There is an option to add a CREATE TABLE statement above the inserts, with a column for each header, so you can stand up a quick table and load it in one go. You can also batch every row into a single multi-row INSERT for faster loading.
More tools
More from the Hivly network
Free sister tools on our other sites.