How to use the SQL → JSON Converter
1. Run your query in the MySQL/PostgreSQL CLI and copy the table output including the +---+ border lines.
2. Paste it here and click Convert. Tab-separated and pipe-separated formats also work.
What is it?
SQL CLI tools output query results as ASCII tables. This tool parses that output into a JSON array suitable for use in APIs, applications, or further processing. Numbers are automatically parsed to their numeric type; NULL values become JSON null.
Supported input formats: MySQL +---+ bordered tables, tab-separated values (TSV), and pipe-separated values.
Example
+----+------+-----+ | id | name | age | +----+------+-----+ | 1 | John | 30 | | 2 | Mary | 25 | +----+------+-----+
[
{"id": 1, "name": "John", "age": 30},
{"id": 2, "name": "Mary", "age": 25}
]Benefits
Generate INSERT and CREATE TABLE statements instantly
Convert JSON, CSV, or a field list into ready-to-run SQL in seconds — no manual quoting, no counting columns, no copy-paste errors from spreadsheet data.
Build SELECT queries without memorising syntax
The visual query builder constructs WHERE conditions, ORDER BY, LIMIT, and DISTINCT clauses interactively — useful for anyone who writes SQL occasionally rather than daily.
Migrate between MongoDB and relational databases
Convert MongoDB find, insert, update, and delete operations directly to SQL equivalents — speed up data migration planning or schema exploration.
All your data stays in the browser
No SQL query, schema definition, or database content is ever uploaded to a server. Everything runs entirely client-side, making these tools safe to use with sensitive data.
Frequently asked questions
How do I get this output from MySQL?
Run your SELECT query in the mysql CLI. The table output with +--+ borders is the default format. Copy everything including the border lines.
Does this work with PostgreSQL psql output?
Yes — psql's default output uses pipe separators. Copy the output and this tool will detect the format automatically.