You are offline. Tools you have opened before keep working.
Excel to MySQL
Create a MySQL table from an Excel sheet and fill it with batched INSERT statements, ready for MySQL Workbench, phpMyAdmin or the command line.
Your files never leave your device. Everything runs in your browser.
Excel
SQL
Report a problem
How it works
Add your Excel dataOpen the file or paste the cells into the input box. The first row becomes the column names.
Check the settingsThe database is already selected. Type the table name and choose how many rows go into each INSERT.
Copy or downloadCopy the SQL or download it as a .sql file and run it in your database tool.
MySQL specific details
Names are quoted with backticks, text uses VARCHAR with a length that fits the data, and true or false values become TINYINT(1). Backslashes in text are escaped, which MySQL needs in its default mode.
Use larger batches for faster imports; MySQL handles thousands of rows per INSERT without trouble.
About Excel
XLSX is the standard Excel format since 2007. It stores each sheet as a grid of cells with values and formatting. Dates are stored as numbers internally; the tool turns them back into readable dates before writing the SQL.
About SQL
SQL is the language relational databases understand. CREATE TABLE defines the columns and their types, INSERT adds the rows. The generated script can be run in SQL Server Management Studio, MySQL Workbench, pgAdmin or any database client.
Frequently asked questions
Will accented characters be stored correctly?
Yes, as long as your table uses a UTF-8 character set such as utf8mb4, which is the default in current MySQL versions.
Is my data uploaded anywhere?
No. Everything runs in your browser. Your spreadsheet is not sent to our servers.
Can I paste data directly from Excel?
Yes. Select the cells in Excel, copy them and paste into the input box. The tool recognizes the tab separated format automatically.
Which Excel files are supported?
Modern .xlsx files from Excel, Google Sheets and LibreOffice. Old .xls files need to be saved as .xlsx first. Files with several sheets let you choose the sheet.
Why are my column names changed?
With Simplify names on, spaces and special characters are replaced, for example Product Name becomes product_name. Turn it off to keep the original names in quotes.
Does it work without an internet connection?
Yes. After you open the page once, it keeps working even if your connection drops.