SQL Results to JSON Converter
Convert SQL query results and table output to JSON. Paste psql, MySQL, or SQLite tabular output and get a JSON array of objects instantly. Free online SQL to JSON converter.
Output will appear here
Press ⌘ Enter to convert
How It Works
- 1Run your SQL query and copy the tabular output
- 2Paste it including the header row
- 3DevConvert produces a JSON array of row objects keyed by column name
Examples
Input
id | name | email 1 | Alice | [email protected] 2 | Bob | [email protected]
Output
[
{ "id": "1", "name": "Alice", "email": "[email protected]" },
{ "id": "2", "name": "Bob", "email": "[email protected]" }
]Input
id | name | status ---+-------+-------- 1 | Alice | active 2 | Bob | inactive
Output
[
{ "id": "1", "name": "Alice", "status": "active" },
{ "id": "2", "name": "Bob", "status": "inactive" }
]Frequently Asked Questions
What SQL clients does this support?
DevConvert parses pipe-delimited table output from psql (PostgreSQL), MySQL CLI, SQLite3, and any other tool that outputs | separated tables.
Does it handle the dashes separator row (---+---)?
Yes. Separator rows between the header and data are automatically detected and skipped.
Can I paste EXPLAIN output?
EXPLAIN output varies by database and is not tabular data — it won't parse correctly with this tool.
Are column types preserved?
All values are parsed as strings since SQL CLI output does not carry type information. Cast values in your application after importing.