Skip to content
ToolInstant

CSV to SQL Converter

Local

Convert CSV to SQL INSERT statements with a CREATE TABLE and detected column types. MySQL, PostgreSQL, SQLite or SQL Server, with safe quoting and batching.

Loading tool…

Ready · Runs in this browser · nothing uploaded

Developer tools · Free · No upload · No sign-up

How to use the csv to sql converter for free

  1. 1Paste CSV or open a .csv file.
  2. 2Pick the database, table name, batch size and NULL handling.
  3. 3Copy the SQL or download it as a .sql file.

Also useful for: csv to sql, csv to insert statements, csv to mysql, csv to postgresql, csv to sqlite, generate create table from csv.

  • Completely free, no account needed
  • Your data never leaves your device
  • Works on desktop and mobile

Frequently asked questions

Is this CSV to SQL converter free?+

Yes. Every tool on ToolInstant is free to use with no sign-up and no limits on how often you use it.

Is my data uploaded anywhere?+

No. Everything is processed inside your browser using JavaScript. Your input never leaves your device.

Does it work on mobile?+

Yes. ToolInstant works in any modern browser on phones, tablets and desktops.

How are column types chosen?+

Every value in a column is checked. Whole numbers become INTEGER or BIGINT, decimals DECIMAL(p,s), true/false BOOLEAN, YYYY-MM-DD DATE and date-times TIMESTAMP. Anything else is text, including numbers with leading zeros like PIN codes, so the zeros aren't lost.

Is the output safe from SQL injection?+

Text is always written as a quoted literal with quotes doubled (and backslashes escaped for MySQL), and names are quoted for the chosen database. Still review the script before running it on a production database.