JSON to CSV
ConverterConvert a JSON array of objects to CSV with custom delimiters and headers, flatten nested keys and pick which fields to export for spreadsheet and BI tools.
Related Tools
About JSON to CSV
CSV is the most universal tabular format — for Excel, Google Sheets, database bulk import, and analytics pipelines. This tool converts a JSON array of objects to CSV in your browser, automatically deriving column names from object keys, flattening nested fields into dotted columns (for example user.name), and quoting/escaping any value that contains a comma, double quote, or newline per RFC 4180. When objects in the array have inconsistent keys, the tool unions all seen keys into the header and fills missing cells with empty values so every row stays aligned. A key constraint to understand: CSV is a two-dimensional table, so the input must be an array of objects — a single object is treated as a one-row table. You can control whether a header row is emitted and how empty values are filled. Nothing is uploaded, so business data with personal information stays local. For example, [{"name":"Tom","age":20}] yields a CSV with name,age headers plus a data row that opens cleanly in Excel.
How to Use
- Open the JSON to CSV tool
- Select the source and target formats
- Adjust the output options as needed
- Click the Convert button; results appear in real time
- Copy or export the result
Use Cases
- Export to Excel — Convert API JSON to CSV and open it in Excel or Sheets for tabular analysis.
- Database import — Convert JSON to CSV for bulk loading via LOAD DATA and similar commands.
- Generate reports — Convert JSON stats results to CSV for non-technical colleagues to review.
- Clean data — Sort, filter, and dedupe the converted CSV in spreadsheet software.
- Cross-tool exchange — Turn JSON into CSV, a format nearly every data tool supports.
- Machine learning — Convert a JSON dataset to CSV for training models with tools that expect tabular input.
- Pivot analysis — Flatten nested JSON objects into CSV columns to run pivot tables in spreadsheet software.
FAQ
Must JSON be an array?
Yes. CSV is a 2D table, so JSON should be an array of objects (one object per row). A single object is treated as a one-row table.
Will commas in values break it?
No. Values with commas, newlines, or quotes are automatically wrapped in double quotes and escaped per RFC 4180.
What if objects have different fields?
The tool collects every key seen across all objects as the header; cells missing in a given object are left blank.
Can I choose the delimiter?
Comma by default. For TSV (tab) or semicolons, replace in an editor afterward or use the List Converter tool.
How are nested objects flattened?
Nested fields become dotted column names (e.g. user.name) rather than raw object text, keeping columns predictable for spreadsheet manipulation.
What should I watch for when opening in Excel?
If Chinese text appears garbled, the file likely lacks a BOM; re-save as UTF-8 with BOM (or transcode) so Excel detects the encoding correctly.
Can I convert it back to JSON exactly?
Usually not. CSV stores every value as a string, so going back loses typed information such as numbers, booleans, and null. Flattened dotted columns like user.name cannot be reliably restored to the original nesting, and the array structure is not preserved either. If round-tripping matters, keep the original JSON as a separate metadata source and normalize dates and empty values before exporting; otherwise treat CSV as a one-way export for display or import rather than a reversible format.