SQL to CSV Converter
Paste SQL INSERT statements and get CSV output — pick a delimiter, toggle the header, and paste into your spreadsheet or data tool.
Last updated: May 27, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is SQL to CSV Converter?
A SQL INSERT statement holds the same information as a CSV row, just wrapped in different syntax. Converting between them is mechanical work — but doing it by hand for a dump file with thousands of rows is impractical, and naive find-and-replace breaks on embedded commas and quotes.
This tool parses INSERT statements with a real tokenizer (the same one used for SQL to JSON) and emits a properly quoted CSV. Cells that contain the delimiter, a double quote, or a newline are wrapped in double quotes per RFC 4180, with embedded quotes doubled. The result drops cleanly into Excel, Google Sheets, or any CSV parser.
How to Use SQL to CSV Converter
Paste one or more SQL INSERT statements.
Pick a delimiter: comma, semicolon, pipe, or tab.
Toggle the header row and quote-every-cell options.
Copy the CSV output.
Common Use Cases
- Migrating data from a SQL dump to a spreadsheet for analysis.
- Converting database fixtures into a CSV file for a downstream load.
- Pasting data from a SQL export into Excel or Google Sheets.
- Generating tab-separated output to paste into a TSV-aware tool.
Example Input and Output
A multi-row INSERT becomes a CSV table with a header row.
INSERT INTO users (id, name) VALUES (1, 'Alice'), (2, 'Bob, Jr.');id,name
1,Alice
2,"Bob, Jr."Privacy
All parsing happens in your browser. No SQL is sent to a server.
RFC 4180
The output follows RFC 4180: double quotes wrap fields containing delimiters, quotes, or newlines; embedded double quotes are escaped by doubling them.

