Canonical: https://toolipedia.app/sql-insert-to-csv

# SQL INSERT to CSV

Read SQL INSERT statements as text and export their rows as CSV, TSV or JSON, with quoted strings, NULL values and several tables in one paste handled.

Breadcrumbs: Toolipedia > Documents and files > Data and spreadsheet tools > SQL INSERT to CSV

## About SQL INSERT to CSV

A database dump or a migration script often holds data only as INSERT statements. Paste them and this tool reads the values as text, without running anything, and exports the rows for a spreadsheet or program. It handles a column list or none, many rows in one statement, strings with doubled quotes or backslash escapes, NULL, TRUE, FALSE, numbers and expressions such as NOW(), and several tables in one paste, which you pick from a list. Choose CSV, tab-separated or JSON. The example gives two rows for users, including the name O'Brien, Pat, which is quoted correctly.

## How to use SQL INSERT to CSV
1. Paste the INSERT statements, including any comments or other SQL around them.
2. Pick the table to export if the text has more than one, and choose CSV, TSV or JSON.
3. Decide how NULL should look and whether to include a header row, then copy or download the result.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
- Free to embed on your own website, with a ready-made code to copy.

## Also known as
- sql insert to csv
- convert insert statements to csv
- sql dump to csv
- parse sql insert values
- insert into to json

## Frequently asked questions

### Are my statements executed?

No. They are only read as text by a small parser in your browser, so nothing touches a database and nothing is uploaded.

### What if the INSERT has no column list?

The columns are then named column1, column2 and so on, because the order of values in the table definition is not known to the tool. Rename them in your spreadsheet.

### Which statements are not supported?

INSERT ... SELECT and INSERT ... SET are skipped and listed in a warning, because their rows are not written out as values in the text.

### Is SQL INSERT to CSV free?

Yes. SQL INSERT to CSV on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

### Can I put SQL INSERT to CSV on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

## Related tools

More free tools that go well with SQL INSERT to CSV:
- [JSON to SQL INSERT Generator](https://toolipedia.app/json-to-sql-insert)
- [SQL query on CSV](https://toolipedia.app/sql-query-csv)
- [CSV to JSON](https://toolipedia.app/csv-to-json)
- [CSV to SQL](https://toolipedia.app/csv-to-sql)
- [CSV Add Column Tool](https://toolipedia.app/csv-add-column)
