100% Client-Side Privacy
Adawaty Pro • adawaty-pro.com
48+ Offline Client-Side Converters & Technical Guides
Home / Legacy Data & Business / SQL (Dump) to CSV / XLSX / JSON
Read Technical Guides →

SQL (Dump) to CSV / XLSX / JSON

Extract INSERT INTO tables from SQL database backup dumps — 100% private client-side processing.

100% Client-Side JS

Active Converter

Smart Auto-Fix:
1. Source File(s) or Paste Input: No file selected
2. Live Output (Editable):
Database Backup Auditing (MySQL, MariaDB & PostgreSQL)

SQL Dump to CSV / Excel / JSON: Extracting INSERT Tables Without a Database Server

Technical Anatomy of .SQL Logical Backups

A logical database backup (.sql) generated by mysqldump, phpMyAdmin, MariaDB, or pg_dump --inserts is a plain-text script mixing Data Definition Language (CREATE TABLE, ALTER TABLE) with Data Manipulation Language (INSERT INTO). Inside an extended insert block, a single statement can pack hundreds of tuple rows separated by commas: INSERT INTO `orders` (`id`,`customer`,`total`) VALUES (1,'Amine',120.50),(2,'Lina',89.00);.

Extracting tabular spreadsheets directly from .sql text requires a state-aware tuple tokenizer that respects single-quoted strings containing commas, escaped quotes (\' or ''), NULL literals, and nested parentheses inside HTML or JSON column payloads. Doing this locally in browser memory lets analysts inspect client backups without provisioning a local SQL server.

Raw mysqldump INSERT Statement vs. Converted Excel / CSV Rows

-- Input: WordPress / MySQL Backup (orders_backup.sql)
INSERT INTO `shop_orders` (`order_id`, `client`, `status`, `amount`) VALUES
(1041, 'Youssef Karim', 'delivered', 340.00),
(1042, 'Nadia O''Connor', 'pending', 195.50);

# Converted Excel / CSV Output:
order_id,client,status,amount
"1041","Youssef Karim","delivered","340.00"
"1042","Nadia O'Connor","pending","195.50"

Real-World Software & Hardware Ecosystem

Backend developers, agency auditors, and e-commerce managers frequently receive .sql dumps from cPanel / phpMyAdmin, WordPress / WooCommerce, PrestaShop, Magento, DBeaver, HeidiSQL, and pgAdmin. Converting a backup straight to .xlsx or .json makes it easy to recover lost customer emails, reconcile historical invoices, or hand clean data to non-technical stakeholders.

Troubleshooting & Edge Cases

  • Compressed .sql.gz Backups: Many cPanel exports are gzipped (backup.sql.gz). Unzip the archive first so you upload the plain .sql text rather than compressed binary bytes.
  • Multi-Table Backups: If a dump contains 40 different tables (e.g., wp_options, wp_posts, wp_users), isolate the specific INSERT INTO block you need in the left editor or filter by table/keyword in Interactive Table view.
  • Escaped Newlines (\n) Inside Blog Posts: Long HTML/text columns often contain literal \r\n escapes; exporting to JSON preserves multi-line content more cleanly than flat CSV.

SQL Dialect Comparison: MySQL vs. PostgreSQL vs. SQLite Dumps

Database EngineIdentifier QuotesRecommended Dump Flag for Excel Export
MySQL / MariaDB`table_name`mysqldump --complete-insert db table > out.sql
PostgreSQL"table_name"pg_dump --inserts --column-inserts db > out.sql
SQLite 3"table_name"sqlite3 app.db .dump > out.sql

Extracting Single Tables from Massive WordPress Backups

# Isolate only WooCommerce orders from a 500 MB full-site mysqldump before uploading:
grep -E "^INSERT INTO \`wp_wc_orders\`" full_backup.sql > orders_only.sql

Frequently Asked Questions

How does the parser extract spreadsheet rows from a mysqldump or pg_dump .SQL file without running a database server?

It scans the SQL script for INSERT INTO table_name (...) VALUES (...); statements—including multi-row bulk inserts—and parses quoted string literals, escaped apostrophes (''), NULL keywords, and numeric values directly into structured rows.

Can I extract tables from a WordPress or phpMyAdmin backup .SQL file into Excel?

Yes. phpMyAdmin and WP-CLI backups store posts, WooCommerce orders, and wp_users as standard INSERT INTO statements. Uploading the .sql file lets you audit records in Excel or JSON without spinning up XAMPP, Docker, or MySQL.

What happens to CREATE TABLE, LOCK TABLES, and SQL comments (-- or /* */) inside the dump?

DDL schema statements, transaction markers (BEGIN/COMMIT), and MySQL conditional comments (/*!40101 ... */) are automatically skipped so only clean tabular record data enters your CSV, Excel, or JSON output.

Why did my PostgreSQL COPY ... FROM stdin dump produce fewer rows than an INSERT dump?

By default, pg_dump uses tab-delimited COPY blocks instead of INSERT INTO statements. Re-export with pg_dump --inserts (or convert the COPY block directly using our TSV to Excel tool) for full row extraction.