Skip to content

SQL to XLSX Converter

Extract data from SQL INSERT statements and convert it into a Microsoft Excel XLSX file, with automatic column sizing and a frozen header row.

Category: data
Use Case: Database Export, Excel Reports, SQL Dump Review
Privacy: 100% browser-based

Excel Options

Recommended Settings

Pro Tips

  • Numbers and booleans parsed from your SQL become real numeric and boolean cells in Excel, not text
  • Works with a single INSERT statement with many VALUES tuples, or multiple separate INSERT statements for the same table
  • Escaped single quotes ('') inside string values are automatically unescaped
  • If an INSERT statement doesn't list column names, generic column1, column2... headers are generated
  • Frozen headers and header styling make the exported spreadsheet easier to scan

Most Popular

Most users enable all options for professional, Excel-ready spreadsheets

When to Use This Tool

Database Export to Excel

Convert data extracted from a SQL dump's INSERT statements directly into an Excel spreadsheet for reporting, review, or handoff to non-technical stakeholders.

Reviewing SQL Dumps

Quickly inspect the actual data inside a large .sql backup or seed file by converting its INSERT statements into a proper spreadsheet.

Business Reporting

Turn raw seed or export data into a formatted Excel report with frozen headers and styled columns, ready to share with business teams.

Data Migration Prep

Export SQL INSERT data to Excel as an intermediate format when migrating between systems that don't share a common data pipeline.

How It Works

1

Split the SQL input into individual statements, respecting semicolons inside quoted strings

2

Filter to statements starting with INSERT INTO, and parse each one's table name, optional column list, and VALUES section

3

Extract each parenthesized VALUES tuple, correctly handling nested parentheses and commas inside quoted string values

4

Parse each value into its native type - numbers and booleans become real Excel cell types, not text

5

Generate a native Excel XLSX file using the SheetJS library, with optional column sizing, frozen headers, and header styling

100% Private

Files never leave your device. All processing happens locally in your browser.

Lightning Fast

Powered by SheetJS (xlsx) for optimal performance on modern browsers.

Secure

No data collection, no tracking, no sign-up required.

Frequently Asked Questions

What SQL syntax does this tool support?

It parses standard INSERT INTO table (columns) VALUES (...), (...); statements, including statements without an explicit column list. CREATE TABLE statements and other SQL are ignored.

Are numbers and booleans preserved as real Excel types?

Yes. Numeric and boolean values parsed from your SQL are written as native numeric and boolean cells in the spreadsheet, so they sort and calculate correctly in Excel, rather than being stored as text.

Can I convert multiple INSERT statements at once?

Yes. Paste any number of INSERT statements - whether they're multiple separate statements or one statement with many VALUES tuples - and all their rows are combined into a single sheet.

What happens if column names aren't specified in the SQL?

If an INSERT statement doesn't list column names (e.g., INSERT INTO t VALUES (1, 'x')), generic headers like column1, column2 are generated based on the widest row.

What does 'freeze header row' do?

It's an Excel feature that keeps the first row visible while you scroll down through large datasets, so column names stay in view no matter where you are in the spreadsheet.