Does it connect to my database?
No. It only writes a .sql file. You run the statements yourself in your own database client.
Turn a CSV into a .sql file of INSERT statements, with an optional CREATE TABLE, for PostgreSQL, MySQL, SQLite, or SQL Server. Column types can be detected from the data, empty cells can become NULL, and quotes are escaped correctly. Nothing is run against any database; the tool only writes the file.
Loading the CSV tools.
You do not have to take our word for it. Browser developer tools list every request a page makes, so you can watch 2csv work and confirm that your data is never sent anywhere. The check takes about a minute.
F12, or Cmd+Option+I on a Mac, and select the Network tab.Your file is read into this tab's memory with the browser's own file reader, parsed and changed by code that is already on the page, and handed back to you as a download. It is never uploaded, never stored in the browser, and gone when you close the tab. The only other request the site can make is the feedback form, and only when you submit it.
The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so even a bug could not send your data elsewhere.
Single quotes inside values are escaped by doubling them, so a name such as O'Brien is written safely and cannot break out of the string. The live preview in the export bar shows the real first statements with your settings, so you can check quoting and types before downloading.
With type detection on, each column gets a type from its values. Whole numbers become BIGINT or INTEGER, decimals become NUMERIC, DOUBLE, REAL, or FLOAT depending on the dialect, true/false columns become BOOLEAN or BIT, and dates become DATE written as ISO values. Anything else is text. With detection off, every column is text.
No. The tool writes text into a .sql file and nothing else. It does not connect to a database, does not run the statements, and does not run SQL queries against your CSV. You run the file yourself in your own database client, where you can review it first. That keeps credentials and data entirely on your side.
As big as the table. Grouping 500 or 1000 rows per INSERT keeps the file smaller and loads faster than one statement per row. Use one row per INSERT when you want a failing row to be easy to find. If a filter is on, only the matching rows are written, which is a quick way to load a subset.
For very large tables, cutting the CSV into parts first with the CSV splitter and converting each part gives several smaller .sql files that are easier to load one at a time.
All eighteen tools are on the 2csv home page, and once a file is open you can switch between them without reloading it. Part of the 2suite.io privacy-first ecosystem.
No. It only writes a .sql file. You run the statements yourself in your own database client.
PostgreSQL, MySQL, SQLite, and SQL Server. The dialect sets identifier quoting, string style, and column type names.
Single quotes are escaped by doubling them, so a value such as O'Brien is written safely inside the statement.
SQL Server rejects a single INSERT with more than 1000 rows of values, so the tool caps it there.
Yes. Turn on empty cells as NULL and blank cells are written as NULL instead of an empty string, which suits numeric and date columns.