Skip to content

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

Input
INSERT INTO users (id, name, admin) VALUES
  (1, 'Ada', TRUE),
  (2, 'O''Brien', NULL);
Output
[
  {
    "id": 1,
    "name": "Ada",
    "admin": true
  },
  {
    "id": 2,
    "name": "O'Brien",
    "admin": null
  }
]

How to use the SQL to JSON Converter

  1. Paste or type your SQL into the input area, or open a file from your device.
  2. Adjust the options above the editor if the tool offers any.
  3. 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.

Browse all sql converters →