Convert SQL INSERT statements and table dumps into structured JSON arrays and CSV tables.
Your data is computed entirely inside your browser's JavaScript engine and is never transmitted across the network.
1[2 {3 "order_id": 1001,4 "customer_name": "Hamza Malik",5 "total_amount": 4500,6 "currency": "PKR",7 "order_status": "completed",8 "is_paid": true9 },10 {11 "order_id": 1002,12 "customer_name": "Ayesha Siddiqui",13 "total_amount": 12800.5,14 "currency": "PKR",15 "order_status": "shipped",16 "is_paid": true17 },18 {19 "order_id": 1003,20 "customer_name": "Zainab Bibi",21 "total_amount": 3200,22 "currency": "PKR",23 "order_status": "pending",24 "is_paid": false25 },26 {27 "order_id": 1004,28 "customer_name": "Farhan Saeed",29 "total_amount": 95000,30 "currency": "PKR",31 "order_status": "processing",32 "is_paid": true33 },34 {35 "order_id": 1005,36 "customer_name": "Omer Butt",37 "total_amount": 1850,38 "currency": "PKR",39 "order_status": "completed",40 "is_paid": true41 }42]Follow these 3 simple steps to complete your conversion in seconds.
Paste your SQL Query to JSON / CSV code directly into the left editor pane or click Upload to select a file.
Adjust indentation (2 or 4 spaces), toggle alphabetical key sorting, set SQL table name and dialect quotes, or pick a built-in template.
View formatted output in real time with line numbers and syntax highlighting. Click Copy or Download to save.
Formula representation used for accurate calculations:
Quick reference lookup table for standard unit calculations.
| Feature / Construct | PostgreSQL / SQLite | MySQL / MariaDB |
|---|---|---|
| Identifier Quoting | "table_name", "column" | `table_name`, `column` |
| String Escaping | 'O''Reilly' | 'O''Reilly' or 'O\'Reilly' |
| Boolean Values | TRUE / FALSE | TRUE / FALSE (TINYINT 1/0) |
| JSON Objects | '{"a": 1}'::jsonb | '{"a": 1}' |
| Null Handling | NULL | NULL |
Common questions and answers about SQL Query to JSON / CSV Converter.