Excel to SQL INSERT
Generate INSERT statements from a worksheet — identifiers quoted, every value escaped, empty cells as NULL.
What is Excel to SQL INSERT
Excel to SQL conversion treats the first row as column names and every following row as values, emitting INSERT statements. Identifiers made of safe characters are used as-is and anything else is double-quoted; values have single quotes doubled. Empty cells become NULL rather than empty strings.
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Offline
- Works with the network disconnected
What the generated INSERT statements look like
One INSERT per row, with the sheet name or a chosen table name as the target. Each value is quoted according to its type: numbers bare, text in single quotes with embedded quotes doubled, empty cells as NULL. That is the subset every SQL dialect accepts.
Identifiers are quoted with double quotes (standard SQL) rather than backticks or brackets, and characters that are not safe in an identifier are replaced with an underscore. A column called Total ($) becomes "Total (__)" — ugly but valid, and it will not break the statement.
The output is a script, not a migration. It has no CREATE TABLE, no transaction wrapper and no type inference beyond number versus text. Run it against a table you created, or use it as a starting point and add the DDL yourself.
The three ways this goes wrong in practice
Dates. Excel stores a date as a serial number, so a naive export writes 46336 where you expected 2026-11-20. This converter writes real dates as ISO strings, but a date typed as text stays text and may not match the target column's date type.
Large files. A hundred thousand rows produce a hundred thousand INSERT statements and a script that most clients refuse to run in one go. Batch it, or load the CSV with the database's own COPY/LOAD DATA command, which is orders of magnitude faster.
Encoding and reserved words. A column named order or group is a reserved word in most dialects; quoting handles it, but hand-written follow-up queries will still need the quotes.
How to use
- 1.Choose an .xlsx file
- 2.Set the table name (defaults to the file name)
- 3.Run it, then copy the INSERT statements
How this compares
There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.
| Aspect | This tool | Upload-based converters | Desktop software |
|---|---|---|---|
| Where the file is processed | In your browser, on this page | On the vendor's servers, after an upload | On your own machine, after installing an app |
| Account required | No | Usually — free tiers ask you to sign in before lifting a limit | No, though a licence may be needed |
| Size you can process for free | No size cap, no run limit | A few files per hour, or a ~5–10 MB cap before a paywall | Whatever your disk and RAM allow |
| Price | Free. Pro is $9/month, and only buys larger files and AI features | Usually a subscription — roughly $7–15/month as of November 2026 | A one-off licence, or a subscription |
| Works offline | Yes, once the page has loaded | No | Yes |
| Time before work starts on a 20 MB file | Immediate — there is nothing to upload | Dominated by the upload — about 16 s on a 10 Mbps uplink | Just the app launch |
| What it cannot preserve | Formulas become their last computed value; merged cells and styles are dropped | The same — the conversion is the same maths | The same, though some desktop apps re-render styles more faithfully |
Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.
Frequently asked questions
Which databases does the output target?
Standard INSERT ... VALUES syntax works on PostgreSQL, MySQL and SQLite. Identifiers use double quotes (standard SQL); if your MySQL runs without ANSI_QUOTES, swap them for backticks.
Is the output safe from SQL injection?
Values are escaped by doubling single quotes and identifiers are quoted unless they match a safe pattern. Still review generated SQL before running it in production — a tool cannot know what the data means.
What about empty cells?
They become NULL. If you want empty strings instead, replace them afterwards.
Does it handle large sheets?
A few thousand rows are fine. Hundreds of thousands make one statement unusably large — convert to CSV and use COPY / LOAD DATA instead.
What this kind of conversion cannot keep
Spreadsheet conversion is lossy by nature: a workbook carries formulas, styles, merged cells and multiple sheets, while CSV carries rows of text. This tool keeps values and order, recalculates nothing, and drops presentation on purpose. That is why it can run without a server — and why a converted file will not look like the original.
More in Spreadsheets & Docs
On this page
- What is Excel to SQL INSERT
- What it does with your file
- How it actually behaves
- How to use it
- How this compares
- FAQ
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →