Excel → SQL Generator

Upload .xlsx or .csv — get CREATE TABLE + INSERT for 5 SQL dialects.

Your spreadsheet stays in this tab — nothing uploaded

Generate SQL INSERT statements from an Excel file

Drag an .xlsx, .csv, or .tsv file here, or click to select

No file selected

About this Excel to SQL generator

Upload an .xlsx or .csv file and get a complete SQL script: a CREATE TABLE statement with column types inferred from the data (INTEGER, BIGINT, DECIMAL, DOUBLE, BOOLEAN, DATE, TIMESTAMP, or TEXT) plus batched INSERT statements for your chosen SQL dialect — PostgreSQL, MySQL, SQLite, SQL Server, or Oracle. The XLSX parser is hand-written with zero dependencies, reading the ZIP structure and XML worksheets entirely in your browser.

This is the data-engineering complement to the CSV → SQL and JSON → SQL tools. It handles the specific annoyances of spreadsheet-to-database migration: date cells stored as serial numbers, mixed numeric/text columns, empty cells mapped to NULL, and proper string escaping. You can set the table name, batch size, and download the result as a .sql file.

FAQ

How does the type inference work?

The tool scans every value in each column. If all non-empty values are integers within the 32-bit range, the column is INTEGER. Larger integers get BIGINT. Values with decimals get DECIMAL or DOUBLE depending on precision. Recognized date/timestamp patterns get DATE or TIMESTAMP. If any value cannot be parsed as a number, boolean, or date, the column falls back to TEXT.

Can I change the inferred types?

The generated SQL shows the inferred type as a comment next to each column in the CREATE TABLE statement. You can edit the output directly before running it. The INSERT values are formatted to match the inferred type (quoted for TEXT, unquoted for numbers, NULL for empties).

What SQL dialects are supported?

PostgreSQL, MySQL, SQLite, SQL Server, and Oracle. The differences include quoting (double quotes vs backticks vs brackets), data types (TEXT vs NVARCHAR vs VARCHAR2), and INSERT syntax (multi-row VALUES vs individual statements for Oracle).

Related tools