How to Convert JSON to CSV — Free Online Converter
Table of Contents
You have JSON data from an API, a database export, or a web scraping job, and you need it in a spreadsheet. Maybe you are a data analyst who works in Excel. Maybe you need to import records into a CRM that only accepts CSV. Maybe your manager asked for "a spreadsheet" and the data lives in a JSON file.
Our free JSON to CSV converter handles this instantly. Paste your JSON, click convert, and download the CSV. The conversion runs entirely in your browser — your data never touches a server. This matters when you are working with API responses containing user data, financial records, or proprietary business information.
JSON vs CSV — Understanding the Formats
JSON and CSV solve different problems, and understanding the structural differences explains why conversion is not always straightforward.
JSON (JavaScript Object Notation)
JSON is a hierarchical, tree-like format. Data is organized in key-value pairs. Objects can contain other objects (nesting). Values can be strings, numbers, booleans, arrays, or null. A single JSON record can have vastly different structures — one record might have 5 fields while another has 50. JSON is the lingua franca of web APIs and modern data exchange.
[
{
"name": "Jane Smith",
"email": "[email protected]",
"address": {
"city": "Austin",
"state": "TX"
},
"tags": ["developer", "manager"]
}
]
CSV (Comma-Separated Values)
CSV is a flat, tabular format. Every row has the same number of columns. There is no nesting, no hierarchy. Each value is a simple string or number. CSV is the universal import/export format for spreadsheets (Excel, Google Sheets), databases (MySQL, PostgreSQL), analytics tools (Tableau, Power BI), and CRMs (Salesforce, HubSpot).
name,email,address.city,address.state,tags
Jane Smith,[email protected],Austin,TX,"developer, manager"
The challenge in conversion is collapsing JSON's hierarchy into CSV's flat structure. Nested objects become dot-notation column names. Arrays get joined into single values or expanded into multiple columns.
Why Convert JSON to CSV?
- Spreadsheet analysis. Excel and Google Sheets are the world's most-used data analysis tools. They expect tabular data. Converting JSON to CSV lets you use pivot tables, charts, VLOOKUP, and other spreadsheet features on API data.
- Database imports. Most databases support CSV import natively. PostgreSQL's COPY command, MySQL's LOAD DATA INFILE, and SQLite's .import all expect CSV or TSV.
- CRM imports. Salesforce, HubSpot, Zoho, and most CRMs accept CSV for bulk contact/lead imports. If your lead data comes from an API in JSON format, you need to convert first.
- Reporting. Non-technical stakeholders want spreadsheets, not JSON files. Converting to CSV makes data accessible to anyone.
- Data migration. Moving data between systems that do not share an API often involves exporting from one as JSON and importing to another as CSV.
Handling Nested Objects and Arrays
Flat JSON arrays convert trivially — each object becomes a row, each key becomes a column header. But real-world JSON is rarely flat. Here is how our tool handles complexity:
Nested Objects
Nested objects are flattened using dot notation. The object {"address": {"city": "Austin"}} becomes a column named address.city with value Austin. This preserves the relationship between parent and child fields while fitting into a flat table.
Arrays of Primitives
An array like {"tags": ["dev", "lead"]} gets joined into a single cell: dev, lead. This keeps the CSV clean and avoids column explosion. If you need each array element in its own column, you can post-process in Excel using Text to Columns.
Arrays of Objects
This is the trickiest case. {"orders": [{"id": 1, "total": 50}, {"id": 2, "total": 75}]} — each order is its own sub-record. Our tool handles this by creating indexed columns: orders.0.id, orders.0.total, orders.1.id, orders.1.total. For deeply nested data with large arrays, consider pre-processing your JSON to extract the array into a separate file.
How Flattening Works
Flattening is the process of converting a nested JSON structure into a flat row of columns. Here is a detailed example:
Input JSON:
{
"id": 42,
"name": "Acme Corp",
"contact": {
"email": "[email protected]",
"phone": {
"office": "555-0100",
"mobile": "555-0101"
}
},
"products": ["Widget A", "Widget B"]
}
Flattened CSV columns:
id, name, contact.email, contact.phone.office, contact.phone.mobile, products
42, Acme Corp, [email protected], 555-0100, 555-0101, "Widget A, Widget B"
Every level of nesting adds a dot-separated prefix to the column name. This is the industry-standard approach (used by jq, pandas, and most data processing libraries). Our built-in processing engine applies this flattening automatically.
Delimiter Options — Comma, Tab, Semicolon
While "CSV" literally means comma-separated, the comma is not always the best delimiter:
| Delimiter | When to Use |
|---|---|
| Comma (,) | Standard CSV. Works with Excel, Google Sheets, and most tools. Default choice. |
| Tab (\t) | TSV format. Better when your data contains commas (addresses, descriptions). Tab-separated files avoid quoting issues. |
| Semicolon (;) | Common in European locales where comma is the decimal separator (1.234,56 vs 1,234.56). Excel in Europe often expects semicolons. |
| Pipe (|) | Rare but useful when data contains both commas and tabs. Some legacy database systems use pipe delimiters. |
Tip: If you are opening the CSV in Excel and your data contains commas (like addresses), use tab delimiter. Or use comma delimiter and ensure the converter properly quotes fields containing commas.
Working with Large JSON Files
Our tool processes JSON in your browser, which means large files depend on your device's available RAM. Here are guidelines:
- Under 10MB: Instant conversion on any modern device.
- 10-50MB: Takes 1-5 seconds. No special considerations needed.
- 50-100MB: May take 5-15 seconds. Close unnecessary browser tabs to free memory.
- Over 100MB: May cause the browser tab to slow down or crash on devices with limited RAM (8GB or less). Consider splitting the file or using a command-line tool like jq.
For enterprise-scale data (100MB+), command-line tools are more appropriate. But for the vast majority of API exports, database dumps, and analytics data, browser-based conversion handles it effortlessly. Unlike ConvertCSV.com or JSON-CSV.com, your data stays on your device regardless of file size.
Common Conversion Scenarios
API Response to Spreadsheet
You called a REST API and got back a JSON array of objects. Copy the response, paste it into our converter, and download the CSV. Open in Excel or Google Sheets for analysis. This is the single most common JSON-to-CSV use case for developers and data analysts.
MongoDB Export to CSV
MongoDB's mongoexport outputs JSON by default. If you need to share that data with a team that uses spreadsheets, convert to CSV. Our tool handles MongoDB's ObjectId and date formats — they become plain string columns in the CSV.
Google Analytics / Marketing Data
Marketing tools often export data as JSON (especially through their APIs). Google Analytics API, Facebook Ads API, and Twitter Analytics all return JSON. Convert to CSV for pivot table analysis, client reporting, or importing into another tool.
Web Scraping Results
Scrapers typically output JSON arrays. Convert to CSV for import into Google Sheets for manual review, a database for programmatic access, or a CRM for lead enrichment.
Troubleshooting Common Issues
- Invalid JSON error. The most common issue. Ensure your JSON is valid — check for missing commas, unmatched brackets, or trailing commas (not allowed in standard JSON). Use our JSON Formatter tool to validate and fix formatting issues first.
- Empty CSV output. Your JSON might be a single object instead of an array. Wrap it in brackets:
[{ your object }]to make it an array of one record. - Missing columns. If different JSON objects have different keys, the CSV includes all possible columns. Objects missing a key will have an empty cell for that column.
- Excel shows all data in one column. This usually means Excel did not detect the delimiter. Try: Data > Text to Columns > Delimited > Comma. Or re-download using tab delimiter.
- Special characters garbled. Ensure the CSV file is opened with UTF-8 encoding. In Excel: Data > From Text/CSV > select UTF-8 encoding. Google Sheets handles UTF-8 automatically.
Convert JSON to CSV Now
Free, private, no signup. Paste JSON, download CSV — handles nested objects and arrays automatically.
Open JSON to CSV ConverterFrequently Asked Questions
What is the difference between JSON and CSV?
JSON is a hierarchical format that supports nested objects, arrays, and mixed data types. CSV is a flat, tabular format — rows and columns like a spreadsheet. JSON is great for APIs and complex data; CSV is great for spreadsheets, databases, and data analysis tools.
How does the converter handle nested JSON objects?
Nested objects are flattened using dot notation. For example, {"address": {"city": "Austin"}} becomes a column named address.city. Arrays are joined into single cells or expanded into indexed columns depending on their content.
Is there a file size limit?
No hard limit. Since the conversion runs in your browser, the practical limit depends on your device's available memory. Most devices handle JSON files up to 50-100MB without issues. For very large datasets, you may experience a brief delay.
Can I convert CSV back to JSON?
Yes. We have a separate CSV to JSON converter tool that handles the reverse conversion. It reads your CSV headers as JSON keys and each row becomes a JSON object in an array.
Is my data safe during conversion?
Yes. The conversion happens entirely in your browser. Your JSON data is never uploaded to any server. This makes our tool safe for sensitive data. Unlike ConvertCSV.com or JSON-CSV.com, we do not process your data server-side.
What delimiter options are available?
Our converter supports comma (standard CSV), tab (TSV), semicolon (European locale), and pipe (|) delimiters. Comma is the default. Use tab or semicolon if your data contains commas.

