📖 What is this tool?
SQL Results to JSON converts tabular SQL query results — tab-separated or comma-separated with headers — into clean JSON arrays. Paste the output from your database client and get properly typed JSON instantly.
💡 Example
Input
id name age
1 Alice 30
2 Bob 25
Output
[{"id":1,"name":"Alice","age":30},{"id":2,"name":"Bob","age":25}]
🛠️ Common Use Cases
- Convert database query results to JSON for APIs
- Transform SQL exports for JavaScript consumption
- Create JSON fixtures from database data
- Share database data in JSON format
- Convert CSV database exports to JSON
❓ Frequently Asked Questions
What separators are supported? ▾
The tool auto-detects tab-separated (TSV) or comma-separated (CSV) formats. Tab-separated is the default output from most database clients like psql, MySQL workbench and pgAdmin.
How are data types handled? ▾
The converter automatically detects numbers and converts them to JSON numbers. Boolean values (true/false) are converted. NULL values become JSON null. Everything else becomes a string.
Can I convert large result sets? ▾
Yes — the tool runs entirely in your browser with no size limits imposed by servers. Very large datasets may be slow in older browsers but there's no file size restriction.
🔒
Your data stays private. All processing happens entirely in your browser. Nothing is ever sent to our servers. You can use this tool offline after the page loads.