JSON to CSV Converter Online
Free JSON to CSV converter online. Flattens nested objects into dot-notation columns, auto-detects headers and exports RFC 4180 CSV, TSV or Excel files.
To convert JSON to CSV, paste an array of objects into the left pane. Every unique key across all objects becomes a column header, nested objects flatten to dot-notation columns such as user.name, and the RFC 4180 result appears on the right ready to open in Excel or Google Sheets.
JSON InputInput
CSV OutputOutput
📊 Real-Time Structural Payload Evaluation
Programmatic Execution Modules
Native runtime recipes for automated pipelines • Zero external cloud dependencies
npx json2csv -i input.json -o output.csv --flattenimport { createReadStream, createWriteStream } from 'node:fs';
import { Transform } from 'node:stream';
export function escapeCSVField(val: unknown): string {
if (val === null || val === undefined) return '';
const str = typeof val === 'object' ? JSON.stringify(val) : String(val);
if (/[",\r\n]/.test(str)) {
return `"${str.replace(/"/g, '""')}"`;
}
return str;
}RFC 4180 Escaping & CSV Injection Defense
String Interpolation EscapingFields starting with symbols (=, +, -, @, tab) can trigger dynamic formula injection in spreadsheet engines. All strings containing delimiters, quotes, or newlines are wrapped in double quotes with internal quotes escaped as "".
Heterogeneous Array Row Flattening Heuristics
Sparse Matrix AlignmentWhen JSON records within an array possess asymmetric schemas (e.g., item 1 has keys {a, b}, item 2 has {b, c}), a naive loop produces jagged tabular rows. The engine executes a first-pass header synthesis to align missing indices as empty strings.
📚 Task-Specific Reference Guides & Specifications
4 Technical GuidesFrequently Asked Questions: JSON to CSV
How do I convert a JSON array into a CSV file?
Paste your JSON array of objects into the editor. The converter detects all unique column headers across all objects, flattens nested objects if desired, and generates standard RFC 4180 CSV.
How are nested JSON objects and arrays handled in CSV export?
You can enable "Flatten Nested Objects" to turn { user: { name: "Alice" } } into a column named user.name, or stringify sub-arrays as JSON strings within cells.
Can I open the generated CSV in Microsoft Excel or Google Sheets?
Yes. The downloaded .csv file is 100% standard RFC 4180 compliant with UTF-8 encoding, immediately opening into Excel, Numbers, and Google Sheets.
What is the maximum file size for browser CSV conversion?
The converter handles tens of thousands of rows smoothly within client memory.
🔍 Developer Query Intent Index
How to use the JSON to CSV
Step-by-step workflow — executed 100% locally in your browser memory.
- 1
Paste a JSON array
Put an array of objects into the left-hand input pane. A single object is treated as a one-row table.
- 2
Check the detected columns
The header row is the union of every key seen across all objects, so records with missing keys still line up. Nested objects are flattened to dot notation.
- 3
Review the CSV
The right-hand pane shows the delimited result, with fields containing commas, quotes, or newlines quoted and escaped.
- 4
Download for Excel
Download the .csv file and open it in a spreadsheet, or copy the text straight into an existing sheet.
⚡ Technical Specifications & Engineering Compliance Matrix
| Specification Standard | RFC 4180 / ISO/IEC 8859-1 & UTF-8 CRLF Delimited |
|---|---|
| Architecture: | tabular-matrix |
| Time Complexity | O(R * C) where R = records, C = unique leaf headers |
| Memory Footprint | O(1) chunked stream buffer (64KB chunks) |
| Data Privacy & Egress | Zero remote transmission (100% in-browser memory) |
| Last reviewed | by the JSON2X Core Team. |
Related Developer Tools
Architecture: tabular-matrix •Spec: RFC 4180 / ISO/IEC 8859-1 & UTF-8 CRLF Delimited •Last reviewed by the JSON2X Core Team.