Free tools, no sign-up — everything runs in your browser.
ToolHub 1000Free online tools

SQL to JSON Converter

Convert a simple SELECT result shape, given as columns plus rows, into JSON.

Quick answer: enter your details below and click Convert to JSON — your result appears instantly, right here in your browser. Nothing you enter is uploaded or stored.
S
Developer

Enter your details below.

How to use

  1. Enter the column names, separated by commas.
  2. Enter one result row per line, separated by commas.
  3. 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.

Related tools

All tools · Read the guide: SQL to JSON Converter