Skip to content

Excel to SQL Converter

Pick a sheet and get a CREATE TABLE plus one INSERT per row, ready to run; nothing is uploaded.

Processed on your device. Nothing is uploadedHow to check

Try a sample file:

Turn an Excel sheet into SQL in your browser: choose a workbook, pick the sheet, and get a CREATE TABLE statement followed by one INSERT per row. The table name starts as the sheet name and you can change it. A column that holds only numbers becomes REAL, and text is quoted safely. Copy the script or download a .sql file.

Why use Excel to SQL

  • Ready for your database

    Names are in double quotes, standard SQL that PostgreSQL runs as it is.

  • Private

    The workbook is read by your own browser and never sent to a server.

  • Works offline

    After you have used it once, it keeps working without an internet connection.

How it works: convert Excel to SQL

  1. Choose your workbook

    Drop an .xlsx, .xls, .xlsm or .ods file on this page, choose it, or try a sample. It is read in your browser and never uploaded.

  2. Pick the sheet

    The first sheet is converted at once. Choose another from the sheet list; one sheet becomes one table.

  3. Name the table

    The table name starts as the sheet name. Type another and the SQL updates as you type.

  4. Copy or download

    Copy the whole script, or download it as a .sql file to run in your database.

What the Excel to SQL converter handles

  • Files: .xlsx, .xls (Excel 97–2003), .xlsm and .ods workbooks, one sheet at a time.
  • Statements: one CREATE TABLE, then one INSERT per row; empty rows are skipped.
  • Types: a column whose filled cells are all numbers becomes REAL with unquoted values, and an empty cell in it becomes NULL.
  • Text: wrapped in single quotes, with any ' inside doubled, so names like O'Brien stay intact.
  • Values: each cell as Excel shows it, so formulas give their result and dates keep their displayed format.
  • Merged cells: the value goes to the first cell of the range; the others stay empty.

Excel to SQL: what it can't do

  • Names are in double quotes, which MySQL reads only with the ANSI_QUOTES mode on.
  • Dates are written as the text Excel shows, not as DATE values.
  • Password-protected workbooks cannot be opened.

Excel to SQL: questions and answers

Is my file uploaded?
No. Your browser reads the workbook and writes the SQL on your device. Nothing is sent to a server, saved on the site or kept in a history.
Which databases can run the SQL?
PostgreSQL runs it as it is. Table and column names are in double quotes, as standard SQL writes them; in MySQL turn on the ANSI_QUOTES SQL mode first.
How are the column types chosen?
A column whose filled cells are all numbers becomes REAL, its values are written without quotes and its empty cells become NULL. Any other column keeps its values as quoted text.
Are formulas copied into the SQL?
No. Each cell gives the value Excel shows, so a formula becomes its result. Keep the workbook if you still need the formulas.
How do I turn several sheets into several tables?
Convert one sheet at a time: pick a sheet, copy or download its SQL, then pick the next. The table name is set from the first sheet when the workbook opens; type the next table's name yourself.
Why does the preview stop partway through?
The preview shows the first 5,000 lines to stay fast. Copy and Download always take the whole script.
How do I convert an Excel file to SQL INSERT statements?
Open the workbook in OpenAnyDoc's Excel to SQL converter, pick the sheet, and copy the INSERT statements or download them as a .sql file. One sheet becomes one table, with a table name you can change, and the workbook is read in your browser without being uploaded.

Why it's private: your files never leave your browser

Most online viewers upload your file to a server, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.

How we tell you about new features

Announcements are based on the release date shown to everyone, and nothing is stored on your device or sent anywhere.