Turn literal SQL INSERT rows into a JSON array without connecting to a database.
How to use SQL to JSON
- Paste your SQL or load the example.
- Select Convert.
- Read the result in the output panel.
What the tool does
Use INSERT INTO with an explicit column list and VALUES for one table at a time. SELECT, functions, schema-qualified names and dump directives are outside this converter’s scope.
Try this example
INSERT INTO people (id, name) VALUES (17, 'O''Neil'), (18, NULL);
Questions about SQL to JSON
Does my input leave this page?
The tool processes the input in your browser.
How much can I paste?
The input accepts up to one million characters.
Why is a large number rejected?
Numeric values outside the safe JavaScript integer range can lose digits. Put large identifiers in double quotes in JSON, or in single quotes in SQL.
What if the tool shows an error?
Check the error beneath the input. Load the example to see the format this tool expects.