JSON to CSV / CSV to JSON Converter
Upload a file or paste your text to instantly convert JSON to CSV or CSV to JSON with advanced data handling – securely in your browser.
Why Use This Tool?
Bridging the gap between developer APIs and standard spreadsheet software is now easier and more precise. Our free JSON / CSV Universal Converter lets you convert JSON to CSV or Excel for Google Sheets and Microsoft Excel, or CSV and Excel files to JSON for code and APIs, from raw text or uploaded files. Whether you are analyzing API exports, migrating databases, or feeding data into a web application, this tool provides instant, accurate formatting.
With advanced settings, you have granular control over nested JSON, data type inference and empty cell handling. Because ZapBoxHQ processes all data locally using client-side technology, your sensitive database exports and API payloads are never uploaded to any external servers.
How to Use This Tool
4 Quick StepsChoose the Direction
Pick JSON → CSV or CSV → JSON at the top of the converter.
Add Your Data
Paste JSON or CSV, or upload a .json, .csv or Excel file. It converts as you type.
Adjust the Options
Flatten nested JSON, pick a separator, detect data types and choose how empty cells appear.
Copy, Download or Share
Copy the result, download it as CSV, Excel or JSON, or send it on WhatsApp.
JSON / CSV Converter
Convert JSON to CSV or Excel, and CSV or Excel to JSON, as you type.
CSV to JSON Conversion Example
CSV stores data as rows and columns, while JSON stores each record as an object with named fields. When converting, the first CSV row becomes the field names, and each following row becomes one JSON object. The Data types setting decides whether values like 24.99 and true become real numbers and booleans or stay as text.
id,name,price,in_stock 1,Desk Lamp,24.99,true 2,Wall Clock,18.5,false
[
{
"id": 1,
"name": "Desk Lamp",
"price": 24.99,
"in_stock": true
},
{
"id": 2,
"name": "Wall Clock",
"price": 18.5,
"in_stock": false
}
]Numbers and true or false values keep their real data types.
[
{
"id": "1",
"name": "Desk Lamp",
"price": "24.99",
"in_stock": "true"
},
{
"id": "2",
"name": "Wall Clock",
"price": "18.5",
"in_stock": "false"
}
]Every value is wrapped in quotes, so nothing is changed or reformatted.
Converting Nested JSON to CSV
API responses usually wrap records in an outer object and nest details inside each record. The converter finds the list of records for you and flattens each nested field into its own column, so the result opens neatly in Excel or Google Sheets.
{
"orders": [
{
"id": 1001,
"customer": {
"name": "Sarah Khan",
"city": "Lahore"
},
"items": [
"Desk Lamp",
"Notebook"
],
"total": 32.5
}
]
}id,customer.name,customer.city,items,total 1001,Sarah Khan,Lahore,Desk Lamp; Notebook,32.5
The orders list is found automatically, customer becomes two columns, and the items list is joined into one cell.
Empty Cell Handling Options
When a CSV row has a blank cell, such as a product with no discount, you can choose how that blank appears in your JSON.
| Setting | JSON Result | Best For |
|---|---|---|
| Omit the field | {"name": "Floor Rug"} | APIs and NoSQL databases where missing fields are simply left out |
| Use null | {"name": "Floor Rug", "discount": null} | Databases and typed code that expect every field to exist |
| Use empty text | {"name": "Floor Rug", "discount": ""} | Forms and front-end apps that treat every value as text |
Converter Options Explained
The result updates as soon as you change an option, and your choices are remembered for your next visit.
| Option | Mode | What It Does |
|---|---|---|
| Nested objects | JSON → CSV | Flatten into dot-named columns such as customer.city, or keep each nested object as JSON text in one cell |
| Lists (arrays) | JSON → CSV | Join simple values into one cell (a; b), split them into numbered columns (tags.1, tags.2), or keep them as JSON text |
| CSV separator | Both | Comma, semicolon, tab or pipe. In CSV → JSON mode the separator is detected automatically |
| Data types | CSV → JSON | Turn numbers and true/false into real JSON types, or keep every value as text |
| Empty cells | CSV → JSON | Omit the field, use null, or use an empty text value |
| JSON format | CSV → JSON | Array of objects, array of arrays, or JSON Lines with one record per line |
| Build nested objects | CSV → JSON | Turns headers like address.city back into nested JSON objects |
| Indentation | CSV → JSON | 2 spaces, 4 spaces, or minified on one line to save space |
Frequently Asked Questions
Quick answers to common questions about converting between JSON, CSV and Excel.
How do I convert JSON to CSV?
Choose JSON → CSV at the top of the tool, then paste your JSON or upload a .json file. The CSV appears instantly: each object becomes a row and its keys become the column headers. Then copy the output or download it as a CSV or Excel file.
How do I convert CSV to JSON?
Choose CSV → JSON, then paste your CSV or upload a .csv or Excel file. The first row is used as the field names for each JSON object. Pick your Data types and Empty cells settings, then copy or download the JSON.
Can I convert nested JSON to CSV?
Yes. With Flatten selected, nested objects become columns with dot names, so customer.name and customer.city get their own columns. Lists of simple values are joined into one cell, such as Desk Lamp; Notebook, or you can split them into separate columns or keep them as JSON text.
What if my JSON list is inside another object?
API responses often wrap the records, as in {"status": "ok", "orders": […]}. The converter finds the largest list of records inside your JSON automatically and tells you which one it used, so you do not need to edit the JSON first.
Can I convert Excel to JSON or JSON to Excel?
Yes. Upload an .xlsx, .xls or .ods file in CSV → JSON mode to turn a sheet into JSON, and choose the sheet if the workbook has more than one. In JSON → CSV mode, choose Excel workbook (.xlsx) as the format to download your JSON as an Excel file.
What does data type inference do?
With Detect numbers and true/false selected, values that look like numbers or true and false become real JSON numbers and booleans. Values with leading zeros, such as ZIP code 00501, and numbers longer than 15 digits stay as text so nothing is lost. Choose Keep all values as text to put every value in quotes.
How should I handle empty cells?
Choose Omit the field to leave the key out of the object, Use null to keep the key with a null value, or Use empty text to keep the key with a blank value. Pick the option the system receiving your JSON expects.
Does it support JSON Lines (NDJSON)?
Yes. You can paste JSON Lines, with one JSON object on each line, in JSON → CSV mode. In CSV → JSON mode, choose JSON Lines as the JSON format to get one compact object per line, which is common for logs, BigQuery and data pipelines.
Why does it say my JSON is not valid?
The tool shows the line and column where the problem is. Common causes are a comma after the last item, single quotes instead of double quotes, or a missing bracket. Fix that spot and the conversion runs straight away.
Can I send the converted file on WhatsApp?
Yes. On phones and computers that support sharing files, Send on WhatsApp shares the converted file itself, so you can pick WhatsApp from the share menu. On other devices, short results are sent as a WhatsApp message, and larger files can be downloaded and attached.
Is my data uploaded to a server?
No. All conversions run locally in your browser, so your database exports, API payloads and spreadsheets never leave your device. The tool is also free with no signup.
Related Free Tools
These free tools work well alongside the JSON / CSV Converter. Like this one, they all run privately in your browser.