CSV to SQL Converter

Drag file here, or click to select file

INSERT mode
No data to display

How to convert CSV to SQL online

  1. Paste CSV text into the left textarea, or upload a CSV file.
  2. Confirm whether the first row is a header row, choose SQL dialect and table name.
  3. Decide if you want a CREATE TABLE statement and single-row or multi-row INSERTs, then copy or download the generated SQL on the right.

Privacy

All CSV-to-SQL conversion runs locally in your browser using JavaScript. Your CSV data and generated SQL are never uploaded to any server.

CSV to SQL Conversion FAQ

Is my CSV file uploaded when converting to SQL?

No. The CSV to SQL converter runs entirely in your browser. Files are parsed with JavaScript and SQL strings are generated locally, without sending data to any server.

Which SQL databases are supported?

The tool can generate SQL for MySQL/MariaDB, PostgreSQL, SQL Server, SQLite and Oracle. You can switch the dialect in the options panel and the column types and boolean literals will adapt accordingly.

How are column types inferred from CSV?

The converter scans sample values of each column and tries to infer integers, big integers, decimals, booleans, dates, datetimes and text. Numeric-looking values with leading zeros are kept as text to avoid breaking IDs and codes.

Can I use this for very large CSV files?

You can convert reasonably large CSV files, but very big files are limited by your browser memory and CPU. For tens of megabytes and above, it is safer to split the CSV into several smaller files and convert them separately.