SQL to CSV Converter
Paste SQL INSERT statements and extract the data as a CSV — column names come from the first INSERT.
- 100% local — nothing leaves your browser
- No sign-up, no account, always free
- Instant download once converted
Paste SQL INSERT statements and extract the data as a CSV — column names come from the first INSERT.
Need to go the other way? Convert CSV to SQL →
SQL to CSV: Extracting Data from SQL Dumps and INSERT Statements
SQL database dumps are a standard format for backups and migrations, but the data inside them is not easy to inspect or analyse directly. Converting SQL INSERT statements to CSV lets you extract the raw data from a dump file into a spreadsheet-ready format without running a database server or writing a custom parsing script.
ConvertRow parses SQL INSERT INTO statements using a regex-based extractor. Paste your SQL INSERT statements, and the converter reads the column names from the first INSERT header and the values from every VALUES clause. Each tuple becomes a CSV row. The output is a clean CSV you can open in Excel, import into another database, or process with any data tool.
The conversion runs locally in your browser with no server calls. SQL dumps often contain sensitive data like user records, financial transactions, or application state — keeping the conversion in-browser means that data never leaves your machine.
For best results, use INSERT statements that include column names (INSERT INTO table (col1, col2) VALUES (...)) rather than positional INSERT statements (INSERT INTO table VALUES (...)). The parser uses the column list in the first INSERT to generate CSV headers. Multi-row VALUES clauses — where one statement inserts multiple rows — are fully supported.
Common use cases for SQL to CSV conversion:
- Extracting data from a database backup to analyse in a spreadsheet
- Migrating INSERT statement data to a different database that accepts CSV import
- Reviewing the contents of a SQL seed file without running a database
- Converting a legacy database dump for import into a modern tool
- Auditing or comparing datasets stored in SQL dump format
Frequently Asked Questions
The converter handles standard INSERT INTO statements with a column list: INSERT INTO table (col1, col2) VALUES (val1, val2). It supports MySQL backtick-quoted identifiers, standard double-quoted identifiers, single-quoted string values, NULL values, and multi-row VALUES clauses.
Yes. The converter ignores everything except INSERT INTO statements — CREATE TABLE, ALTER TABLE, SET, and other DDL/DML statements are skipped. Only the INSERT data is extracted.
SQL NULL values are converted to empty cells in the CSV output. This is the standard representation of a missing or undefined value in CSV format.
Yes. Single-quoted string values that contain commas are handled correctly because the parser reads the full quoted string before splitting on commas. Escaped single quotes (' or '') within strings are also handled.
Yes. The regex parser runs synchronously in the browser and processes thousands of INSERT rows in milliseconds. For very large dump files (tens of megabytes of SQL text), paste the relevant section rather than the entire dump to keep it fast.