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.
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.
- Is my file sent to a server?
- No. Everything runs locally in your browser. Your file is read and processed on your own device, nothing is uploaded, and nothing is logged or stored.
More tools
More from the Hivly network
Free sister tools on our other sites.