
JSON to CSV Converter — Export JSON to Spreadsheet
A JSON to CSV converter takes structured JSON data and flattens it into tabular CSV format that spreadsheets like Excel, Google Sheets, and LibreOffice can open directly. JSON is great for applications and APIs, but when you need to share data with non-technical teammates, build a report, or import into a analytics tool, CSV is the format people expect. This guide covers how flattening works, array handling, delimiter options, Excel compatibility, and practical use cases.
Why Convert JSON to CSV
JSON and CSV serve different audiences. JSON is hierarchical, supports nesting and arrays, and is the lingua franca of APIs. CSV is flat, universal, and opens in any spreadsheet application. Converting from JSON to CSV bridges the gap between developer tools and business tools.
Common scenarios:
- Reporting — export API data to CSV for business stakeholders who live in Excel
- Data analysis — load JSON data into a spreadsheet for pivot tables and charts
- System migration — move data from a document database to a relational one that accepts CSV
- Sharing — send data to someone who doesn't have tools to parse JSON
The JSON to CSV converter handles these scenarios in your browser, with no upload and no signup.
Flattening Nested Objects
JSON supports arbitrary nesting. CSV is flat — rows and columns only. The converter must flatten nested objects into column names using dot notation.
{
"name": "Alice",
"address": {
"city": "New York",
"zip": "10001"
}
}
Flattens to:
name,address.city,address.zip
Alice,New York,10001
The dot-notation column names preserve the structure information. When you import this CSV back into a system that understands dot notation (like the CSV to JSON converter), the nesting is reconstructed.
Handling Deep Nesting
Deeply nested JSON produces long column names. A structure like user.profile.address.location.coordinates.lat becomes a column header that's unwieldy but unambiguous. Some converters offer a depth limit — flatten only the first N levels and stringify anything deeper. This trades precision for readability.
<svg viewBox="0 0 800 280" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:800px;margin:24px auto;display:block">
<rect x="0" y="0" width="800" height="280" fill="#f8fafc" rx="12"/>
<text x="400" y="35" fill="#1e293b" font-size="17" font-family="sans-serif" text-anchor="middle" font-weight="bold">Flattening Nested JSON to CSV Columns</text>
<rect x="30" y="60" width="340" height="200" fill="#8b5cf6" rx="8"/>
<text x="200" y="90" fill="white" font-size="14" font-family="sans-serif" text-anchor="middle" font-weight="bold">JSON (Nested)</text>
<text x="50" y="120" fill="#ede9fe" font-size="11" font-family="monospace">{</text>
<text x="70" y="140" fill="#ede9fe" font-size="11" font-family="monospace">"name": "Alice",</text>
<text x="70" y="160" fill="#ede9fe" font-size="11" font-family="monospace">"address": {</text>
<text x="90" y="180" fill="#ede9fe" font-size="11" font-family="monospace">"city": "NYC",</text>
<text x="90" y="200" fill="#ede9fe" font-size="11" font-family="monospace">"zip": "10001"</text>
<text x="70" y="220" fill="#ede9fe" font-size="11" font-family="monospace">}</text>
<text x="50" y="240" fill="#ede9fe" font-size="11" font-family="monospace">}</text>
<line x1="375" y1="160" x2="435" y2="160" stroke="#94a3b8" stroke-width="3" marker-end="url(#arr3)"/>
<rect x="440" y="60" width="330" height="200" fill="#10b981" rx="8"/>
<text x="605" y="90" fill="white" font-size="14" font-family="sans-serif" text-anchor="middle" font-weight="bold">CSV (Flat)</text>
<text x="460" y="130" fill="#d1fae5" font-size="11" font-family="monospace">name,address.city,address.zip</text>
<text x="460" y="160" fill="#d1fae5" font-size="11" font-family="monospace">Alice,NYC,10001</text>
<text x="460" y="200" fill="#64748b" font-size="10" font-family="sans-serif">Dot notation preserves</text>
<text x="460" y="215" fill="#64748b" font-size="10" font-family="sans-serif">structure in column names</text>
<defs>
<marker id="arr3" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L9,3 z" fill="#94a3b8"/>
</marker>
</defs>
</svg>
Array Handling
Arrays are the trickiest part of JSON to CSV conversion. A JSON array can contain objects, primitives, or nested arrays — none of which map cleanly to a flat CSV row.
Arrays of Objects
The most common case: a JSON array where each element is an object. Each object becomes a CSV row.
[
{ "name": "Alice", "age": 30 },
{ "name": "Bob", "age": 25 }
]
name,age
Alice,30
Bob,25
Arrays Inside Objects
When an object contains an array, there are several strategies:
Join with separator — array values are joined into a single cell:
{ "name": "Alice", "tags": ["admin", "editor"] }
name,tags
Alice,"admin,editor"
Expand to columns — each array element gets its own column:
name,tags.0,tags.1
Alice,admin,editor
Expand to rows — the object is duplicated for each array element:
name,tags
Alice,admin
Alice,editor
The right choice depends on your use case. Joining is simplest. Column expansion works for fixed-length arrays. Row expansion works for variable-length arrays but duplicates data.
Mixed and Nested Arrays
Arrays containing arrays or mixed types are stringified — converted to their JSON representation and placed in a single cell. This preserves the data without losing information, though it makes the cell harder to use in spreadsheet formulas.
Delimiter Options
CSV isn't always comma-separated. Depending on your locale and target application, you may need a different delimiter:
| Delimiter | When to Use |
|---|---|
Comma (,) |
Default, works with most tools |
Semicolon (;) |
European Excel locales (comma is decimal separator) |
Tab (\t) |
TSV format, avoids quoting issues |
Pipe (|) |
Legacy systems, data containing commas |
If you're opening the CSV in Excel on a European system and everything appears in one column, switch to semicolon and try again.
Excel Compatibility
Excel is the most common destination for CSV files, and it has quirks that a good converter should handle:
- UTF-8 BOM — Excel on Windows needs a Byte Order Mark at the start of the file to correctly interpret UTF-8 encoding. Without it, non-ASCII characters (accents, symbols, non-Latin scripts) display incorrectly.
- Quoted fields — values containing the delimiter, quotes, or newlines must be wrapped in double quotes. Excel expects this.
- Escaped quotes — quotes inside quoted fields must be doubled (
""). Excel's CSV parser handles this correctly. - Line endings — Excel on Windows expects
\r\nline endings. Unix-style\ncan cause display issues.
The JSON to CSV converter produces Excel-compatible output by default, including BOM and proper quoting.
Use Cases
Exporting API Data for Reports
Your application stores data as JSON. A stakeholder asks for a spreadsheet report. Convert the JSON to CSV and send it — they open it in Excel without needing any technical tools.
Data Analysis in Spreadsheets
JSON data is hard to analyze in a spreadsheet. Converting to CSV lets you use pivot tables, filters, and charts — tools that business analysts already know.
Feeding Data to Legacy Systems
Older systems and enterprise tools often accept CSV imports but not JSON. Convert your JSON data to CSV to integrate with these systems without building a custom adapter.
Backup and Archive
CSV is a simple, human-readable format that any text editor can open. Converting JSON data to CSV creates a portable backup that doesn't require specialized tools to read.
Tips for Accurate Conversion
- Start with valid JSON — run your input through the JSON formatter first to catch syntax errors
- Choose the right array strategy — pick join, column expansion, or row expansion based on your downstream needs
- Check for inconsistent keys — if objects in an array have different keys, some CSV cells will be empty; this is expected
- Use semicolons for European Excel — if your data contains commas in values or you're targeting European locales
- Verify with a round-trip — convert CSV back to JSON using the CSV to JSON converter to verify no data was lost
Related Tools
- JSON to CSV Converter — Flatten JSON to spreadsheet format
- JSON Formatter — Validate JSON before conversion
- CSV to JSON Converter — Reverse conversion for importing spreadsheets
Published: August 20, 2026
Category: Data Tools
Reading Time: 6 minutes



