UltKit

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

Output

Files are processed on our servers and deleted after 30 minutes.

How to use this tool

  1. 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. 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. 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.

Answer

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

Sample Excel to SQL output

Sheet with headers id, customer, signup_date and two rows, converted with the PostgreSQL dialect and table name customers
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

UltKitDatabase import wizardHand-written script
Works without a running database connectionyesnoyes
Output you can review, commit to Git and rerunyesnoyes
Apostrophes in names escaped for youyesyesno
Dates rewritten as ISO literalsyesDepends on localeno
Same file for MySQL, PostgreSQL, SQLite or SQL ServerPick a dialectnono
Files deleted after30 minStays localStays 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
XLSX converter

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
–
SQL converter

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.