XlsConverter

Excel to SQL with CREATE TABLE and typed INSERTs

Upload the Excel or XLS file, name the table, choose MySQL, PostgreSQL or SQLite, then convert and download the .sql file. It contains CREATE TABLE plus batched INSERT statements.

XLS

Encrypted, auto-deleted

Demo converts up to 100 rows, once.
Database administrator with a laptop in a server room aisle

Moving spreadsheet data into a database usually means an import wizard that guesses types badly, or a script that someone has to write and maintain. An SQL dump is simpler: one file you can review, version and run with the database client you already use.

XlsConverter reads XLS, XLSX and other workbooks and writes SQL in the dialect you choose. For dialect specific details see Excel to MySQL, Excel to PostgreSQL and Excel to SQLite.

How to convert Excel to SQL in three steps

  1. 1Upload the XLS or XLSX workbook.
  2. 2Set the table name, SQL dialect and column types.
  3. 3Convert and download the .sql dump.

Inferring SQL column types from untyped spreadsheet cells

A spreadsheet column has no declared type, so the converter has to choose one. Looking at the first ten rows is how most tools fail: a column of integers turns out to contain 12.5 on row 3,000, or a ZIP code column is read as INTEGER and loses its leading zeros. We scan every value, choose the narrowest type that fits all of them, and keep identifier like columns as VARCHAR. You can still override any choice.

Empty cells become NULL, not empty strings, unless you ask otherwise, which matters for NOT NULL constraints and for COUNT queries later. Text values are escaped for the chosen dialect, so an apostrophe in a company name never breaks the dump. Dates are written in ISO format, which all three dialects accept.

Header text becomes column names after cleanup: spaces to underscores, reserved words like order or group quoted, duplicates numbered. Legacy XLS files with data split across sheets can be merged into one table. If you prefer to load data with a bulk loader rather than INSERT statements, export XLS to CSV instead, or start from text with CSV to SQL.

Excel to SQL questions

How do I convert an Excel file to SQL?

Upload the workbook, choose the SQL dialect and table name, review the inferred column types, and download the .sql file with CREATE TABLE and INSERT statements.

Which databases does the SQL output support?

MySQL and MariaDB, PostgreSQL, and SQLite, each with dialect correct quoting and types.

How are empty Excel cells written in SQL?

As NULL by default. You can switch to empty strings for text columns if your schema requires it.

Can each Excel sheet become its own table?

Yes. Select several sheets and each one becomes a table named after the sheet.

Can I try Excel to SQL in a demo?

Yes, a one-time demo converts up to 100 rows, and you download the SQL after signup. Full tables need a paid plan from 24 USD per month billed yearly.

Related converters

Convert full files and batches

Pro starts at $24 per month billed yearly. Cancel any time.

See plans