Excel to SQL Converter
The converter writes a SQL script that creates a table from your header row and inserts every row below it, quoted for the database you pick.
Data Converter
or drop CSV, TSV, TXT … files here ·
Max 95 MB per file· Up to 20 files· Deleted after 30 minutes
Files are processed on our servers and deleted after 30 minutes.
Character that separates columns in CSV and text files, for both reading and writing. Auto detects it from the input and writes commas.
UTF-8 works for every language. Choose UTF-8 with BOM if Excel on Windows shows garbled accents or Asian characters when opening the CSV.
Excel, ODS and Numbers input: convert the first sheet only, or every sheet (one CSV per sheet in a ZIP, or one JSON key per sheet).
Name of the sheet tab in the new spreadsheet, up to 31 characters.
Array of objects uses column names as keys for every row; array of arrays is more compact and keeps the header as the first array.
Name of the outer element that wraps all rows; each row becomes a <row> inside it.
Used in CREATE TABLE and INSERT statements. Letters, digits and underscores only.
Quoting and column types differ slightly between databases; pick the one you will import into.
Rewrite date cells in one format. ISO (2026-10-18) is safest for databases and code; keep leaves them as they appear in the source.
How to use this tool
- 1
Upload the workbook
Add an XLSX, XLS or ODS file. The first sheet is read; its first row supplies the column names. Up to 20 files per batch, 95 MB each.
- 2
Pick the dialect and table name
Open Advanced settings and set SQL dialect to the database you will run the script in, then type a SQL table name using letters, digits and underscores.
- 3
Convert and run the script
Press Convert to SQL, download the .sql file and run it in your database client, or feed it to the command-line tool your database ships with.
How do I convert Excel to SQL?
Upload the workbook, choose your database under SQL dialect and press Convert to SQL. You get a .sql file with a CREATE TABLE statement built from the header row and INSERT statements for the data, ready to run.
Excel to SQL: who turns a sheet into INSERT statements
Spreadsheets are where data starts; databases are where it gets used. A developer receives a product catalog from the sales team as an XLSX and needs it in the staging database by the afternoon. An analyst wants last quarter's targets next to the order table so one query can compare them. In each case the sheet has the right rows, but the database wants statements.
SQL itself is old and stable: ANSI published the first SQL standard in 1986 and ISO adopted it in 1987. What still differs between databases is the small print, chiefly how a column name is quoted and how strings and dates are written. That is why the converter asks for a dialect instead of producing one generic script. If your data is already a flat file, CSV to SQL does the same job without the workbook step.
SQL dialect differences in the generated script
Identifiers are wrapped in backticks, so a header like order date survives as a column name. The script runs in the mysql command-line client, MySQL Workbench or phpMyAdmin's SQL tab.
- Strings use single quotes, with embedded quotes doubled
Identifiers use double quotes, the form the SQL standard defines. Run the file with psql -f or paste it into pgAdmin's query tool.
- Quoted names keep their upper and lower case
SQLite accepts standard double-quoted identifiers and stores each value with a flexible type. Load the script with sqlite3 data.db < file.sql.
- A good fit for a local analysis copy or a mobile app's seed data
Identifiers are wrapped in square brackets. Open the file in SQL Server Management Studio and execute it.
- A multi-row VALUES list in SQL Server is limited to 1,000 rows per INSERT statement
Sample Excel to SQL output
CREATE TABLE "customers" (
"id" INTEGER,
"customer" TEXT,
"signup_date" DATE
);
INSERT INTO "customers" ("id", "customer", "signup_date") VALUES
(1, 'O''Neill Hardware', '2026-03-02'),
(2, 'Brightline Studio', '2026-04-15');Excel to SQL converter vs. database import wizards
| UltKit | Database import wizard | Hand-written script | |
|---|---|---|---|
| Works without a running database connection | yes | no | yes |
| Output you can review, commit to Git and rerun | yes | no | yes |
| Apostrophes in names escaped for you | yes | yes | no |
| Dates rewritten as ISO literals | yes | Depends on locale | no |
| Same file for MySQL, PostgreSQL, SQLite or SQL Server | Pick a dialect | no | no |
| Files deleted after | 30 min | Stays local | Stays local |
Excel and SQL format facts
XLSX
Microsoft Excel workbook
XLSX is Microsoft Excel's default workbook format since Office 2007, based on the Office Open XML standard. It stores multiple sheets, formulas, formatting, charts, pivot tables and data validation in a ZIP package of XML. It supports over a million rows per sheet and is the default exchange format for business spreadsheets. Google Sheets, LibreOffice and Numbers open XLSX, though macros and advanced features may not carry over.
- Compression
- –
- Transparency
- –
- Animation
- –
- Introduced
- 2007 · Microsoft
SQL
SQL script
An SQL file is a plain-text script of Structured Query Language statements, such as CREATE TABLE and INSERT, that a database runs in order. It is commonly used for database backups, migrations and sharing sample data. The language itself is an ISO standard, but MySQL, PostgreSQL, SQLite and SQL Server each have their own dialects, so scripts often need small changes between systems. Any text editor can open an SQL file, and a database client is needed to execute it.
- Compression
- –
- Transparency
- –
- Animation
- –
- Introduced
- –
Excel goes to SQL when a list kept by people, such as a price sheet, a customer export or seed data for a new app, has to become a real table that queries, joins and constraints can work on.
Excel to SQL questions
Does the MySQL dialect also work for MariaDB?
Yes. MariaDB started as a fork of MySQL in 2009 and still reads backtick-quoted identifiers and the same INSERT syntax. Managed services such as Amazon RDS run the regular engines, so pick the dialect of the engine, not the hosting brand.
How are Excel dates written into the SQL file?
Excel stores a date as a day count from 1900, so a raw read would insert numbers like 46313. This page sets Dates to ISO, which writes '2026-10-18', a literal that MySQL, PostgreSQL, SQLite and SQL Server all accept for date columns.
How large a sheet can go into one SQL script?
An XLSX sheet holds up to 1,048,576 rows, and an old XLS 65,536. A script that size is large, so check the server limit first: MySQL 8.0 rejects any single statement over max_allowed_packet, 64 MB by default. For very large sheets, a flat file from Excel to CSV and the database's bulk loader is faster.
Can I choose the table and column names?
The table name comes from SQL table name, up to 64 characters of letters, digits and underscores. Column names come from row 1 of the sheet, so rename headers in Excel first if you want snake_case names like order_date.
What happens to formulas and formatting?
A database stores values, so each formula cell is inserted as its last calculated result. Fonts, fills, comments and charts never reach the script.
Why are my column names lowercase in PostgreSQL?
PostgreSQL folds unquoted identifiers to lowercase, so OrderDate and orderdate are the same column unless the name is wrapped in double quotes. The PostgreSQL dialect quotes identifiers, which keeps the case you typed in the header row; query them with the same quotes later.
- CSV to SQL ConverterConvert CSV to SQL: a CREATE TABLE plus INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server, with the table name you choose. No account.
- SQL to CSV ConverterConvert the INSERT statements in a .sql dump to CSV rows you can open in Excel or Google Sheets. MySQL, phpMyAdmin, SQLite and SQL Server dumps.
- Excel to CSV ConverterConvert Excel workbooks (XLS, XLSX, XLSM) to CSV with every sheet as its own file, comma or semicolon delimiters and UTF-8 that Excel reopens cleanly.
- Excel to JSON ConverterConvert Excel sheets to JSON online: header row becomes keys, each row an object, dates written as ISO strings. XLSX, XLS, ODS and Numbers accepted.
- Excel to XML ConverterConvert an Excel sheet to XML without XML maps or the Developer tab. Each row becomes a record, each header a tag. XLSX, XLS and ODS input.
- XLSX to CSV ConverterTurn an XLSX workbook into a clean UTF-8 CSV for Shopify, WooCommerce, Mailchimp, Salesforce or a database import. Formulas become values; dates in ISO.