Free exact browser converter
JSON to CSV
Convert a JSON array of objects to CSV, semicolon-separated data or TSV. Quote cells correctly and keep a consistent header across records.
Interactive tool
JSON to CSV
Ready
Choose a clear output representation.
Detailed conversion guide
How JSON to CSV Works
The converter collects object keys in first-seen order, creates one header and writes one row per object. Each cell is quoted and embedded double quotes are doubled.
Missing and null cells become empty fields. Nested arrays and objects become JSON text inside a cell. They are not expanded into extra columns or rows.
| Input | Output | Meaning |
|---|---|---|
[{"name":"Ada","score":9},{"name":"Lin","score":10}] | "name","score"
"Ada","9"
"Lin","10" | Default example |
[{"a":null}] | "a"
"" | Boundary example |
JavaScript Example
Runnable example for the default sample. The tool also validates its full input contract.
const rows=JSON.parse(input), keys=[...new Set(rows.flatMap(Object.keys))];
const cell=v=>'"'+String(v??"").replace(/"/g,'""')+'"';
const csv=[keys.map(cell).join(","),...rows.map(r=>keys.map(k=>cell(r[k])).join(","))].join("\r\n");Formats, Boundaries and Limitations
Large integers outside JavaScript’s exact range are rejected, including numbers inside nested objects. Quote these numbers in the input JSON. Fractional values follow JavaScript number parsing.
A CSV file has no native JSON types. On a return trip, empty and null are indistinguishable and cells are strings. If an actual string begins with a spreadsheet formula marker, the tool flags it for review.
Related converters
More Text and Encoding Tools
Choose the tool that matches your text or byte workflow.