SQL to JSON
Turn SQL INSERT statements from a database dump into JSON, one object per row, with column names from the INSERT or the CREATE TABLE. All tables at once, also CSV. No upload.
Turn SQL INSERT statements from a database dump into JSON, one object per row, with column names from the INSERT or the CREATE TABLE. All tables at once, also CSV. No upload.
About this tool
SQL to JSON reads the rows of SQL INSERT statements and turns them into JSON, so data from a database export can be used in a script, an API test, a JavaScript app or a spreadsheet without loading it into a database first. Paste the SQL or open a .sql file, for example a dump from mysqldump, phpMyAdmin, pg_dump with inserts, SQLite or SQL Server. The tool finds every INSERT INTO … VALUES statement, including those with many rows in one statement, and gives one JSON object per row. Column names come from the list in the INSERT, or, when the INSERT has none, from the CREATE TABLE of that table earlier in the file; without either, the columns are called column1, column2 and so on. Text keeps doubled quotes such as O’’Neil correctly, NULL becomes null, TRUE and FALSE become true and false, and numbers become JSON numbers unless you untick that option, which is useful for long IDs or phone numbers. MySQL dumps write a quote inside text with a backslash; PostgreSQL and SQL Server keep backslashes as they are, so you can switch backslash escapes off for those. Names in backquotes, double quotes or square brackets are read, and comments are skipped. If the file has several tables you can view them one at a time, or get one JSON object with every table by name. A table of the first rows shows the result, and you can copy the JSON, download it with 2 or 4 spaces or on one line, or save a table as CSV. Problems such as a row with too many values or an INSERT … SELECT, which cannot be read without the database, are listed. Everything runs in your browser; the SQL is never sent to a database or a server.

A dump or INSERT statements.
Columns and values in a table.
One table or all by name.
JSON or CSV.
From the INSERT or CREATE TABLE.
Multi-row VALUES and many INSERTs.
NULL, true, false and numbers.
Backslash escapes on or off.
One JSON object with each table.
No database, no upload.
Database rows where you need them
Rows from a dump for API tests.
Exampleusers.json for a mock server.
Data for a JavaScript or Python script.
ExampleAll tables by name.
Rows from a dump in Excel.
ExampleSave as CSV.
See what a dump really holds.
ExampleThe first rows as a table.
From MySQL to a NoSQL store.
ExampleOne object per row.
Sample records for a guide.
ExampleIndent 2 spaces.
Clean JSON from any dump
Untick Numbers as numbers for IDs, phone numbers and codes with leading zeros.
Untick Backslash escapes, so Windows paths and other text with backslashes stay as they are.
pg_dump --inserts or --column-inserts writes rows as INSERT statements.
Include the CREATE TABLE in the paste when the INSERTs have no column list.
Senior Software Engineer · Developer of Toolyconvert
Hemant developed SQL to JSON and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.
Last updated 29 November 2026
Featured on
Toolyconvert is listed on these product directories and launch platforms.