Skip to main content

SQL to JSON

New

Convert SQL INSERT statements into a JSON array of row objects.

sqljsonconvert
Read the guide
Shortcuts:⌘ KSearch
0 rows · 0 columns

Frequently Asked Questions

What SQL can I paste into this converter?

It is built for INSERT INTO ... VALUES statements with an explicit column list. Plain SELECT statements or INSERT ... SELECT syntax are not supported.

Does it preserve NULL, TRUE, FALSE, and numbers as JSON types?

Yes. NULL becomes null, true and false become booleans, and numeric literals are converted to JavaScript numbers before JSON is generated.

Can it read quoted identifiers like `name`, "name", or [name]?

Yes. The parser strips backticks, double quotes, and square brackets from column identifiers when building JSON keys.

Why am I seeing a column/value mismatch error?

Each VALUES tuple must have exactly the same number of items as the column list. If one row has too many or too few values, the converter stops with that error.

Can I paste multiple INSERT statements at once?

Yes. It splits top-level statements on semicolons and combines all parsed INSERT rows into one JSON array.

Related Tools