SQL to JSON Converter
Convert SQL INSERT statements into JSON records. Handles multi-row VALUES, quoted strings, NULL and booleans.
Runs in your browserSQL → JSON
Loading tool…
Example
INSERT INTO users (id, name, admin) VALUES (1, 'Ada', TRUE), (2, 'O''Brien', NULL);
[
{
"id": 1,
"name": "Ada",
"admin": true
},
{
"id": 2,
"name": "O'Brien",
"admin": null
}
]How to use the SQL to JSON Converter
- Paste or type your SQL into the input area, or open a file from your device.
- Adjust the options above the editor if the tool offers any.
- Review the JSON result, then copy it or download it as a file.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
- Only INSERT ... VALUES statements produce data; INSERT ... SELECT and other statements are ignored.
- Function calls and expressions such as NOW() are kept as their SQL text.
Frequently asked questions
What if my INSERT statements have no column list?
If the SQL also contains the CREATE TABLE statement, its column names are used. Otherwise columns are named column1, column2 and so on.
What happens with several tables?
A dump with INSERTs into more than one table becomes a JSON object with one array of records per table name.
Related converters
SQL to CSV ConverterExtract rows from SQL INSERT statements into CSV, ready for Excel or another database import.SQL to YAML ConverterTurn SQL INSERT statements into YAML records, for fixtures and seed files.JSON to SQL ConverterGenerate SQL INSERT statements from a JSON array of objects, with proper quoting and NULLs.SQL MinifierCompress SQL onto one line by removing comments and extra whitespace, without touching string literals.SQL to XML ConverterConvert SQL INSERT statements into XML, with one element per row and one child element per column.SQL FormatterBeautify SQL queries with dialect-aware formatting for MySQL, PostgreSQL, SQL Server, Oracle, SQLite and more.SQL to HTML TableRender rows from SQL INSERT statements as an HTML table, with one table per database table and a safe preview.