Convert SQL to CSV / Excel
Parse SQL INSERT statements into CSV or Excel rows without running a database.
SQL files contain structured data in the form of INSERT statements, CREATE TABLE definitions, and sometimes SELECT query results. Converting SQL to CSV extracts row data from these statements into a flat, portable format. This tool parses SQL INSERT, CREATE TABLE, and SELECT statements to extract column names and row values. It handles multi-row INSERT syntax, quoted strings with escaped characters, numeric values, NULL literals, and date/time values. The parser understands common SQL dialects including MySQL, PostgreSQL, and SQLite syntax variations. You paste SQL directly into the text area or load a .sql file, and the tool outputs a properly formatted CSV with headers derived from the column names in the INSERT or CREATE TABLE statement. All parsing happens in your browser, which is important because SQL dumps often contain sensitive data like user records, financial transactions, or proprietary business data. The tool handles files up to 100 MB and processes them in a Web Worker to keep the interface responsive.
How to use the Convert SQL to CSV tool
- Load your SQL data: Drag and drop your .sql file, choose a file from your file explorer, or paste SQL statements directly into the paste area.
- Configure output settings: Choose a CSV delimiter (comma, semicolon, tab, or pipe) and toggle whether the first row is a header.
- Convert to CSV: Click the "Convert Data" button to parse SQL INSERT, CREATE, or SELECT statements into CSV rows.
- Export results: Copy the results to your clipboard, download as a local file, or export to Excel format.