SQL Dump → CSV

Paste a SQL dump and extract the rows from its INSERT statements as CSV — one section per table. Runs entirely in your browser, no server, no sign-up.

Try:
CSV

What this tool does

Paste a SQL dump — a .sql file from mysqldump, pg_dump, SQLite .dump, or any migration/export — and this tool pulls the actual row data out of its INSERT statements and hands it back as CSV. When the dump touches more than one table, each gets its own labelled CSV section. Everything runs locally in your browser: nothing is uploaded, it works offline, and there is no sign-up.

How columns are named

The header row (when enabled) is resolved in this order:

  1. The INSERT column listINSERT INTO users (id, name) VALUES …id,name.
  2. A matching CREATE TABLE in the same dump, if the INSERT has no column list.
  3. Generated col1..colN as a last resort, when neither is available.

Comments (-- …, # …, /* … */) and every non-INSERT statement are used for context or skipped. Multiple INSERTs into the same table are concatenated in order.

Options

OptionWhat it does
Only this tableExport just one table by name (case-insensitive). Leave blank to export them all. Selecting one table also drops the ### TABLE: section marker, giving you clean single-table CSV.
Delimitercomma (CSV, default), tab (TSV), semicolon, or pipe.
Header rowOn by default — turn it off to emit rows only.
Text for SQL NULLWhat to write for a NULL cell. Empty by default (an empty field); set it to NULL or \N to make nulls explicit.
Quotingminimal (default) quotes a field only when it contains the delimiter, a ", or a newline; all wraps every field in double quotes.
UTF-8 BOMPrepend a byte-order mark so Excel opens the file as UTF-8.

Example

Input:

INSERT INTO users (id, name, email) VALUES
  (1, 'Alice', '[email protected]'),
  (2, 'Bob', NULL);

Output (default settings):

id,name,email
1,Alice,[email protected]
2,Bob,

With multiple tables, each is prefixed with a ### TABLE: <name> line and separated by a blank line, so you can split the result or copy one section:

### TABLE: authors
id,name
1,Ada

### TABLE: books
id,title,author_id
10,On Computation,1

Limits & edge cases

FAQ

Do I need the CREATE TABLE statements too?

No. If your INSERT statements already list their columns (INSERT INTO t (a, b) VALUES …), that is enough for the header row. Including the CREATE TABLE only helps when the INSERTs omit the column list — then the column names come from the schema instead of generic col1, col2, ….

How are multiple tables returned?

Each table is emitted as its own CSV block, preceded by a ### TABLE: name marker and separated by a blank line. To get one table on its own with no marker, put its name in the Only this table box.

How are SQL NULL values handled?

By default a NULL becomes an empty field. If you would rather see it spelled out — for round-tripping into another database, say — set Text for SQL NULL to NULL, \N, or whatever your target expects.

Which SQL dialects work?

The row extractor is dialect-agnostic for the common cases: MySQL/MariaDB, PostgreSQL, SQLite, and SQL Server dumps all use the same INSERT INTO … VALUES shape. It understands backtick, double-quote, and [bracket] quoted identifiers, N'…' national strings, and multi-row VALUES lists.

Is my data uploaded anywhere?

No. The parsing happens entirely in your browser via WebAssembly. Your dump never leaves your device, and the page keeps working offline once loaded.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool sql-dump-to-csv "INSERT INTO users (id, name) VALUES (1, 'Alice'), (2, 'Bob');"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/sql-dump-to-csv/?sql=INSERT%20INTO%20users%20%28id%2C%20name%29%20VALUES%20%281%2C%20%27Alice%27%29%2C%20%282%2C%20%27Bob%27%29%3B&table=users&delimiter=comma&header=true&null_value=%5CN&quote=minimal&bom=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.