DevConvert
Databases

Export SQL Query Results as JSON

Paste your SQL tabular output and instantly convert it to JSON, CSV, or YAML.

4 min readJanuary 2026

When working with databases (PostgreSQL, MySQL, SQLite), query results are displayed in a tabular format. DevConvert recognises this format and lets you convert it to JSON, CSV, or YAML in one click.


What SQL Result Output Looks Like


When you run a query in psql, pgAdmin, or DBeaver, you get output like:


id | name | email | role

----+--------+----------------------+-------

1 | Rohith | rohith@example.com | admin

2 | Priya | priya@example.com | user

3 | Arjun | arjun@example.com | user


Example


Input (SQL Result):

id | name | active | score

----+--------+--------+-------

1 | Rohith | true | 9.5

2 | Priya | false | 7.2


Output (JSON):

[

{ "id": 1, "name": "Rohith", "active": true, "score": 9.5 },

{ "id": 2, "name": "Priya", "active": false, "score": 7.2 }

]


Use Cases


- Export query results for API responses

- Feed data into scripts or migrations

- Document database state for bug reports

- Convert to CSV for spreadsheets


**Paste your SQL output directly into DevConvert** — the format is auto-detected with high confidence.


Try it now

Use DevConvert to instantly convert your Databases data. No signup required.