SQL to CSV
Turn a SQL dump back into data. Paste INSERT INTO … VALUES (…) statements — from mysqldump, pg_dump, or a migration file — and get a CSV per table. Column names come from the INSERT's column list, or from a CREATE TABLE above it if the INSERT doesn't name them.
How to convert SQL to CSV
- Paste the SQL, or drop a
.sqlfile. - If the dump contains several tables, pick the one you want from the dropdown — the row count is shown next to each name.
- Copy or download the CSV.
What it understands
- Multi-row inserts —
VALUES (1,'a'),(2,'b'),(3,'c')in one statement, the formmysqldumpproduces. - Quoted strings with doubled (
'') or backslash-escaped (\') quotes, including values that contain commas, parentheses, or semicolons. - NULL — written as an empty CSV field.
- Identifier quoting — backticks, double quotes, and square brackets are stripped from table and column names, and
schema.tableis reduced to the table name. - Column names from CREATE TABLE — used when the INSERT has no column list. Key, index, and constraint lines are skipped.
What it doesn't do
This is a parser for literal INSERT data, not a SQL engine. It ignores INSERT … SELECT (there are no literal values to read), function calls like NOW() are passed through as the literal text, and binary or hex blobs come out as written. If a dump has no column names anywhere, columns are numbered column_1…n so nothing is lost — you can rename them with Header row. Going the other way is CSV to SQL.
FAQ
My dump has several tables — do I get all of them?
All of them are parsed; the dropdown switches which one is shown. Download each in turn.
Why are some columns numbered instead of named?
Because neither the INSERT nor a CREATE TABLE in the pasted text named them. Include the CREATE TABLE statement and the names appear.
Are the values unescaped?
Yes — '' becomes ', and \n, \t, \' are decoded, then the CSV is re-quoted properly.
Is my dump uploaded?
No. Parsing happens in your browser, which matters for a dump full of production data.
Privacy
100% client-side. No upload. See the privacy policy.