Excel → SQL INSERT Generator

Drop an .xlsx file and generate a complete, ordered set of SQL scripts — database creation, table schemas, batched INSERT statements per sheet, and a validation report. Choose your dialect and download everything as a .zip.

.xlsx → SQL

Drop an Excel workbook to generate migration scripts

📊
Drop an .xlsx file here or click to browse
.xlsx, .xls, .csv supported
Waiting for file…

⚙️ Configuration

📋 Schema Overview

📄 Generated SQL Scripts


  

What Does This Tool Do?

The Excel to SQL INSERT Generator reads an Excel workbook entirely in your browser using SheetJS. It inspects each worksheet — column headers, data types, row counts — and generates a set of numbered SQL scripts that create the database, build the tables, load the data, and verify the results.

The scripts are ordered for safe execution: database creation first, then all table schemas, then data inserts one table at a time with configurable batch sizes, and finally a validation report that checks row counts match the source file.

Generated Script Breakdown

ScriptContentsPurpose
01_Create_Database.sqlCREATE DATABASE, USESet up the target database
02_Create_Tables.sqlCREATE TABLE with inferred types per sheetBuild all table schemas
03.N_Data_SheetName.sqlBatched INSERT statements for one sheetLoad data one table at a time
04_Validation.sqlRow count verification per tableConfirm all data loaded correctly

Supported SQL Dialects

FeatureMySQLPostgreSQLSQL ServerSQLite
Identifier quoting`backticks`"double quotes"[brackets]"double quotes"
String prefixNoneNoneN'...'None
Boolean typeTINYINT(1)BOOLEANBITINTEGER
Multi-row INSERTYesYesLimited to 1000Yes

Frequently Asked Questions

Does each sheet get its own INSERT script?▼
Yes. Each worksheet generates a separate numbered script file (03.1_Data_SheetName.sql, 03.2_Data_SheetName.sql, etc.) so you can load and verify tables one at a time.
What happens with empty header cells?▼
Empty header cells are automatically named col_1, col_2, etc. to ensure every column has a valid SQL identifier in the generated scripts.
How are quotes handled in data?▼
Single quotes inside string values are escaped by doubling them (e.g. O'Brien becomes O''Brien). This follows the SQL standard for all four supported dialects.
Is there a row limit?▼
There is no hard limit. The tool processes every row in your browser. For very large files (100K+ rows), generation may take a few seconds.
Can I use this with Azure SQL Database?▼
Yes. Uncheck "Include CREATE DATABASE / USE" to skip database-level commands. The table and data scripts use standard T-SQL compatible with Azure SQL.

Related SQL Tools