Turn INSERT statements or a .sql dump into a CSV file that opens in Excel
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 17 Oct 2026.Somebody sent a .sql file and you only need the data in a spreadsheet. Open the dump or paste the INSERT statements: every table in it is found, and the one you pick comes out as CSV with a header row, quoted where a value holds a comma or a line break, ready for Excel or Google Sheets. Dumps from mysqldump, pg_dump and sqlite3 all work, and nothing is uploaded.
Paste or type your input.
Choose the options you need.
Press Ctrl+Enter, then copy or download.
A .sql file is the most common way data gets handed over, and the least convenient one to read when you have no database to load it into. This page reads the data straight out of the SQL text.
| Source | What it looks like | Read as |
|---|---|---|
| mysqldump | INSERT INTO t VALUES (...),(...); with backslash escapes |
Rows, MySQL escapes |
| pg_dump (default) | COPY public.t (a, b) FROM stdin; tab-separated lines, then \. | Rows, \N as null |
| pg_dump --inserts | INSERT INTO public.t VALUES (...); | Rows |
| sqlite3 .dump | INSERT INTO "t" VALUES(...); | Rows |
| Hand-written SQL | INSERT INTO t (a, b) VALUES (...); | Rows |
How it was checked. Real dumps were made by pg_dump 17 in three styles and by SQLite's own dumper, and each reads back to exactly the rows those databases return for the same tables. The SQL written by the JSON to SQL Converter reads back as PostgreSQL stored it, too. Nothing you open is uploaded.
The rest of the article, and all 6 questions about SQL to JSON Converter, are on the SQL to JSON Converter page.
Paste the statements or open the .sql file. Each INSERT INTO table VALUES row becomes an object whose keys are the column names, taken from the INSERT's column list or from the CREATE TABLE in the same file. Pick the table if there are several, then copy the JSON array or download it.
Not directly: Excel does not read SQL. Open the file here instead, choose the table and switch the output to CSV. The CSV has a header row and quotes values that contain commas or line breaks, so it opens in Excel, Google Sheets or LibreOffice with every column in place.
A row with more or fewer values than columns, an INSERT ... SELECT, or a string that is never closed is listed with its line number under the input, and the rest of the file is still read. Nothing is guessed or shifted into the wrong column.
No. The file is read in your browser tab, and nothing is sent to a server or stored. Database dumps often contain customer data, so keeping them on your device matters; you can also use the page offline once it has loaded.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about SQL to JSON Converter and anybody who knows can answer. No account needed.
Same job, other tools: TSV to JSON – Convert tab-separated values, such as a paste from Excel, into JSON.
On the related tools: Query String Parser – Split a URL query string into a table of decoded parameters.