SQL Results to JSON Guide: Columns Plus Rows
Learn the simple columns-and-rows shape this converter accepts, and why it does not parse queries.
What is the SQL to JSON Converter?
This converter handles one supported input shape, stated plainly: you supply the column names as a comma-separated list, and the rows as one comma-separated row per line, with quoted fields handled so a comma inside quotes stays in its field. Each row becomes one JSON object, matching values to columns by position. Values that look like numbers become numbers, and true and false become booleans. It does not parse a full SELECT statement, so paste the result columns and rows rather than the query itself.
How to use it
- Enter the column names, separated by commas.
- Enter one result row per line, separated by commas.
- Click Convert to JSON and copy the array.
Worked example
For the sample, the result is a JSON array of two objects, each with name, age as a number, and city, matching the supplied columns in order.
Why not parse the SELECT statement itself?
Because result data and query text are different things. Accepting columns plus rows keeps the conversion honest and avoids pretending to run a database.
Frequently asked questions
Does it parse a SELECT query?
No. It converts the result shape, columns plus rows, rather than parsing SQL text. Paste the columns and rows, not the query.
What about commas inside a value?
Quote the value, as in CSV. A quoted comma stays inside its field instead of splitting the row.