Convert CSV to SQL Online
Convert CSV to SQL online, free and private: your data never leaves your browser. Paste CSV or drop an Excel file, edit in a real spreadsheet grid, then export INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server.
Drop a CSV or Excel file here
CSV · XLSX · XLS · XLSM · XLSB
Ready to download as a binary file.
How to convert CSV to SQL
Three steps from raw data to ready-to-run SQL.
1. Paste or upload
Paste CSV directly into the landing area, or drop a CSV, XLSX or XLS file. The delimiter is auto-detected.
2. Edit in the grid
Fix values, rename columns, add or remove rows. Changes update the SQL output in real time.
3. Copy or download SQL
Select your SQL dialect, set the table name, and copy or download the ready-to-run SQL file.
Need this conversion in your own app?
The file parsing behind this page is powered by TabularJS: a zero-dependency JavaScript library that converts spreadsheet files to JSON in Node.js and the browser. 16+ formats, formulas, styles and merged cells included.
Frequently asked questions
Which SQL dialects are supported?
MySQL (backtick identifier quoting), PostgreSQL, SQLite (double-quote quoting) and SQL Server (bracket quoting). Column types are inferred as INTEGER, REAL or TEXT.
Is my file private?
Yes. Everything runs in your browser. Your CSV or Excel file is read and processed on your device. Nothing is uploaded, nothing is logged.
Does it generate a CREATE TABLE statement?
Yes. Enable the CREATE TABLE option and the output will include a CREATE TABLE statement with inferred column types (INTEGER, REAL, or TEXT) before the INSERT statements.
How are NULL values handled?
Empty cells are exported as NULL in the SQL output.
Can I change the table name?
Yes. Use the Table option in the output panel to enter a custom table name. It defaults to my_table.
Is there a file-size limit?
There is no server-side limit because nothing is uploaded. Very large files may take a moment depending on your computer.
Can I embed this converter in my own app?
Yes. The engine that powers this page is the TabularJS JavaScript library. You can embed it in React, Vue, Angular or plain JavaScript.