Excel to SQL
Turn an Excel (.xlsx) or CSV table into ready-to-run SQL. Choose your database dialect (MySQL, PostgreSQL, SQLite, SQL Server, Oracle), set the table name and batch size, pick INSERT / REPLACE / UPDATE mode, and optionally generate the CREATE TABLE statement. Files are parsed locally with SheetJS — nothing is uploaded.
SQL Output
Generated SQL appears here.How to use Excel to SQL
Open a local .xlsx or .csv file and convert its rows into SQL statements, processed entirely in your browser with SheetJS. The first row must hold the column names; each following row becomes a record.
Dialects
Choose MySQL, PostgreSQL, SQLite, SQL Server or Oracle. The tool adapts identifier quoting (backticks, "double quotes", [brackets]) and REPLACE/upsert syntax per dialect.
Modes
- INSERT — standard
INSERT INTO ... VALUES (...), batched into multi-row groups of your chosen size (0 or 1 = one row per statement). - REPLACE / upsert — MySQL
REPLACE INTO, SQLiteINSERT OR REPLACE INTO, PostgreSQLON CONFLICT, SQL Server / OracleMERGE. Needs a primary key column. - UPDATE — generates
UPDATE ... SET ... WHERE <pk> = ...per row. Needs a primary key column.
Options
- Batch size — rows per INSERT statement (multi-value). 0 = all rows in one statement.
- String escaping — single quotes are doubled (
'') per SQL standard; empty cells becomeNULL. - CREATE TABLE — a column list is generated from the header, with types inferred from the data (numbers → INT/DECIMAL, dates → DATE, everything else → VARCHAR/TEXT, adapted per dialect).
Copy the output or download it as a .sql file. Your data never leaves the page.