SQL to JSON
Convert SQL INSERT statements into a JSON array of objects.
SQL to JSON
Paste one or more SQL INSERT INTO statements and this tool turns them into a JSON array of objects, one per row, using the column names as keys. It handles multi-row VALUES lists, several statements at once, and the quoting variations you see across MySQL, PostgreSQL and SQL Server dumps — single-quoted string values with '' escaping, and identifiers wrapped in backticks, double quotes or square brackets.
Choose "Grouped by table" instead of the default flat array when your input mixes INSERT statements for several tables — rows are then collected under each table's own name in one JSON object. Type inference casts numeric literals to JSON numbers, TRUE/FALSE to booleans and NULL to JSON null; turn it off to keep every value exactly as it read in the SQL, as a plain string. Pretty-printing adds two-space indentation for readability, or turn it off for a compact, minified result.
The parser is a small hand-written tokenizer built for this one job — no SQL engine runs anywhere and nothing is ever executed. If a statement can't be parsed, the tool reports the line and column and shows the offending fragment instead of failing silently or guessing at a fix. A row with a different number of values than the declared columns is reported the same way, so a typo in a migration script or a seed file is easy to spot.
Everything runs in your browser. The SQL you paste — table names, seed data, migration fixtures — never leaves your device, so it is safe to use on production dumps or anything containing real customer data. When you are done, copy the JSON, download it as a file, or send it straight to another tool such as a JSON formatter.