Turn SQL INSERT statements or a database dump into JSON or CSV, table by table
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 17 Oct 2026.Paste INSERT statements or open a .sql dump and every table in it comes out as JSON or CSV. Dumps from mysqldump, pg_dump (COPY blocks included) and sqlite3 are read with their own escaping rules, and the column types from CREATE TABLE keep numbers, booleans and JSON typed. Files up to 50 MB open here.
Paste the INSERT statements, or open a .sql dump from mysqldump, pg_dump or sqlite3, or press Try an example.
Each table found is listed; pick the one you want.
Read the rows as JSON, with numbers, true and false and JSON columns typed from the CREATE TABLE.
Switch to CSV if you need a spreadsheet, then press 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.
What it reads.
| 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 |
Other statements, such as CREATE INDEX, SET or ALTER TABLE, are skipped. CREATE TABLE gives the column names and types: a decimal column comes out as numbers, a boolean column as true and false (including pg_dump's t and f), and a json or jsonb column as real JSON instead of a string.
Escaping differs by database. MySQL reads a backslash in a string as an escape, so \n is a line break and \' a quote; PostgreSQL and SQLite read backslashes literally. The dump itself usually says which it is, through backticks, ENGINE= or standard_conforming_strings; when nothing does, the page reads standard SQL first and switches to MySQL escapes only when that reads more rows cleanly.
What you get. Pick a table to see it as a JSON array of objects or as CSV, or take every table at once as one JSON object. A row whose value count does not match its columns is skipped and listed with its line number, never silently shifted.
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.
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.
Yes. By default pg_dump writes data as COPY ... FROM stdin followed by tab-separated lines and a closing \. line. Those lines are read with PostgreSQL's text-format rules: \N becomes null, and escapes such as \t and \n become a tab and a line break.
Whole numbers longer than 15 digits, such as 20-digit IDs, cannot be held exactly by JavaScript or by most JSON readers, so they are kept as strings with every digit. Values in a text column that look like numbers, such as the code 007, stay text because the column is declared as text.
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 · JSON to YAML – Turn JSON into clean, readable YAML for configs · Query String Parser – Split a URL query string into a table of decoded parameters.