SQL to CSV Extractor
Extract column names and row values from SQL INSERT INTO statements and convert them to CSV. Runs entirely in your browser.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
Example shown — paste one or more `INSERT INTO table (cols) VALUES (...)` statements.
How it works
- Paste one or more `INSERT INTO` statements.
- The tool extracts the column list and every row of values.
- Copy or download the result as a CSV file.
FAQ
What SQL syntax does this support?
`INSERT INTO table (col1, col2, ...) VALUES (val1, val2, ...), (val1, val2, ...), ...;` statements — the most common form produced by database export tools and `mysqldump`-style dumps. Multiple statements can be pasted together.
How are column names determined?
From the first INSERT statement's column list — every row uses those same columns as the CSV header, in the same order.
Does it handle commas and quotes inside string values?
Yes — it parses quoted strings character by character so commas inside `'like, this'` aren't mistaken for value separators, and doubled or escaped quotes are unescaped correctly.
Is my SQL uploaded anywhere?
No — parsing and conversion happen entirely in your browser. Nothing is sent to a server.
How we compare
| Feature | Online Tool Store | Database GUI export | Manual find-and-replace |
|---|---|---|---|
| No database connection needed | ✓ | Requires connecting to the database | ✓ |
| Handles quoted commas correctly | ✓ | ✓ | Error-prone by hand |
For a quick extraction from a SQL dump snippet someone pasted you, without setting up a database connection, this is the fastest option.