Skip to content

SQL to CSV Converter

Pull the rows out of a .sql dump — INSERT statements or pg_dump COPY — straight to CSV.

Drop a .sql dump here, or click to choose one

Converted on your device — the file is never uploaded

CSV

Quick Tool Overview

The SQL to CSV Converter reads the rows out of a .sql dump — INSERT statements, multi-row VALUES lists and PostgreSQL COPY blocks — and exports any table in it as CSV, without a database.

What it does
Extracts rows from SQL INSERTs into CSV
You give it
A .sql dump or INSERT statements
You get back
CSV per table, with real column names
Best for
Reading a backup without restoring it
Converters Free, unlimited use No sign-up Runs in your browser

About the SQL to CSV Converter

A .sql dump is the most common way a database leaves a server and the most awkward thing to open. Without a running database you cannot query it, and the rows you actually want are buried in INSERT statements with escaped quotes, NULLs and multi-row VALUES lists.

Paste the dump — or drop the .sql file — and take the data as CSV. Every table in the dump is listed with its row count, MySQL and PostgreSQL escaping are both handled, and pg_dump’s COPY … FROM stdin blocks are read as well as INSERT statements. When an INSERT has no column list, the column names are taken from the CREATE TABLE statement in the same file, so you get real headers rather than column_1. NULL can be written as an empty cell, the word NULL or \N, and a UTF-8 BOM makes the result open cleanly in Excel.

Key features of the SQL to CSV Converter

Column names from CREATE TABLE

A mysqldump INSERT with no column list still gets proper headers.

MySQL and PostgreSQL

Backslash and doubled-quote escaping are both handled, detected from the dump.

COPY blocks too

pg_dump’s COPY … FROM stdin data is read as well as INSERT statements.

Every table listed

Pick the table you want; each downloads under its own name.

NULL your way

An empty cell, the word NULL, or \N for re-importing into MySQL.

How to use the SQL to CSV Converter

  1. 1

    Paste or drop the .sql file

    Include the CREATE TABLE statements to get real column names.

  2. 2

    Pick the table

    Every table found is listed with how many rows it holds.

  3. 3

    Choose the delimiter and NULL style

    Empty cell, the word NULL, or \N for a MySQL re-import.

  4. 4

    Copy or download the CSV

    Each table downloads under its own name.

Frequently asked questions

Because the INSERT statements have no column list — mysqldump writes them that way by default — and the CREATE TABLE statement was not in what you pasted. Include it and the real names appear.

Reviews of the SQL to CSV Converter

What people who use the SQL to CSV Converter think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the SQL to CSV Converter. It takes half a minute and no account.

Write the first review

More converters