SQL to JSON Converter
Convert a simple SELECT result shape, given as columns plus rows, into JSON.
Enter your details below.
How to use
- Enter the column names, separated by commas.
- Enter one result row per line, separated by commas.
- Click Convert to JSON and copy the array.
About this tool
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.
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.