SQL INSERT to CSV Converter
Reads INSERT statements and writes the rows as CSV, with column names from the INSERT or from a CREATE TABLE in the same script.
Use the tool
Why this tool exists
A database dump is easy to read for a database and awkward for a spreadsheet. Many people only need the rows of one table in CSV.
The page parses INSERT ... VALUES, including several rows per statement, escaped quotes and NULL. Choose the table when the script has several, and decide whether NULL becomes an empty cell or the word NULL. Only INSERT and CREATE TABLE are read; expressions are kept as text.
How to use it
- Paste the SQL script.
- Pick a table, or leave empty for the first with rows.
- Choose delimiter and NULL handling.
- Copy the CSV.
Frequently asked questions
Which statements are read?
INSERT ... VALUES and CREATE TABLE for column names. Other statements are ignored.
What if there are several tables?
The first with rows is used. Enter another name in the Table option.
Are functions like NOW() evaluated?
No, they stay as text.
Is the SQL uploaded?
No.