SQL to JSON Converter

Turn INSERT INTO … VALUES rows into JSON objects keyed by column name.

100% Client-Side Processing — your data never leaves this browser. Works offline. How it works

0 lines • 0 bytes Ready
Tip: drop a file anywhere on the editor
Input
Paste, type or drop a file
1
Result
Updates as you type
// Output will appear here…
About this tool

How the SQL to JSON works

Convert SQL INSERT statements into a JSON array of objects. Numbers, NULL and booleans keep their types; several tables are grouped by name. Free and private.

How to use the SQL to JSON

  1. Paste INSERT statements or upload a .sql file.
  2. Leave the table field empty for all tables, or type one name.
  3. Copy or download the JSON.

SQL to JSON example

Input
INSERT INTO orders (id, customer, total) VALUES
  (1, 'Aarav', 250.00),
  (2, 'Sara O''Neil', NULL);
Result
[
  {
    "id": 1,
    "customer": "Aarav",
    "total": 250
  },
  {
    "id": 2,
    "customer": "Sara O'Neil",
    "total": null
  }
]

When to use it

  • Turning seed SQL into JSON fixtures for front-end tests.
  • Feeding rows from a dump into a script or API.
  • Inspecting dump contents in a readable format.

Tip: Pair it with the JSON Viewer to explore large exports as a collapsible tree.

Typed values

Numbers stay numbers, NULL becomes null and TRUE/FALSE become booleans, so the JSON is ready for code.

Multiple tables

A dump with several tables becomes one object with an array per table, or filter to a single table.

Dump-friendly parser

Handles comments, multi-row VALUES, escaped quotes and MySQL backslash escapes.

Local processing

Production dumps are parsed in your browser and never uploaded.

FAQ

Common questions

What output do I get for one table?

A JSON array with one object per row, for example [{"id": 1, "customer": "Aarav"}].

And for several tables?

An object keyed by table name: {"orders": [...], "customers": [...]}. Type a table name in the options to get only that table.

Are dates converted?

Dates stay as the strings written in the SQL, for example "2026-03-01 10:15:00".

What if the INSERT has no column list?

Column names come from a CREATE TABLE statement in the input; without one they are named column_1, column_2 and so on.