π JSON to CSV Converter
Paste JSON, get clean CSV with nested object flattening, delimiter choice, and a live preview.
Rows and Columns
Preview (first 20 rows)
How to Use This Calculator
This converter turns JSON data into a clean CSV file you can open in Excel, Google Sheets, or any database tool. It handles nested objects, lets you pick the delimiter, and shows a live preview before you download.
Paste your JSON into the input box. It can be an array of objects, a single object, or an object wrapping one array like {"data": [...]}, which the tool detects automatically.
Choose a delimiter: comma for general use, semicolon for European Excel, tab (TSV) when your text has many commas, or pipe for logs and data pipelines.
Keep "Flatten nested objects" checked to turn {"address":{"city":"Austin"}} into an address.city column. Keep the UTF-8 BOM checked if the file is headed for Excel on Windows.
Check the preview table and the row/column counts, then hit Download CSV to save the file.
How Nested JSON Becomes Flat Columns
CSV has no concept of nesting, so every value must land in a single row of columns. The standard approach is dot notation: each level of nesting adds a segment to the column name. {"user":{"name":"Ann","address":{"city":"Austin"}}} becomes two columns, user.name and user.address.city. When objects in your array have different shapes, the column list is the union of all keys, and missing values become empty cells. Arrays nested inside objects cannot be split across columns sensibly, so they are stored as compact JSON text in one cell, which you can parse later if needed.
Worked Example
Convert this JSON with comma delimiter and flattening on:
[{"name":"Ann","age":30,"address":{"city":"Austin"}},{"name":"Bob","age":25}]
The column headers become name,age,address.city. The first data row is Ann,30,Austin and the second is Bob,25, with an empty cell because Bob has no address. That is 2 rows and 3 columns. If a value itself contains a comma, like {"a":"x,y"}, the output quotes it as "x,y" so parsers do not split it into two columns.
Getting Clean Files Into Excel
Excel is picky in two ways. First, encoding: Excel on Windows reads CSV files using your regional encoding unless the file starts with a UTF-8 byte-order mark, so accented characters and emoji turn into mojibake without it. This tool adds the BOM by default. Second, the separator: in many European locales Excel expects semicolons, so a comma file opens as one giant column. Pick the semicolon delimiter in that case. If numbers with leading zeros (like ZIP codes) lose their zeros, that is Excel converting text to numbers on import; opening via Data, From Text/CSV and marking the column as Text preserves them. Google Sheets handles all of this gracefully with File, Import.
Frequently Asked Questions
How do I convert nested JSON to CSV?
CSV is flat, so nested objects must be flattened first. This tool turns {"address":{"city":"Austin"}} into a single column named "address.city" using dot notation. Arrays inside objects are stored as JSON text in one cell, since a single cell cannot hold a table. Keep "Flatten nested objects" checked unless you want each nested object dumped as raw JSON text.
CSV vs TSV, which should I use?
Use CSV (comma-separated) for general interchange; it is the most widely supported format. Use TSV (tab-separated) when your text fields contain lots of commas, since tabs rarely appear in normal text and you avoid heavy quoting. Use semicolons if you share files with European Excel users, because their Excel expects semicolons as the default separator.
Why does Excel mangle my CSV?
The two classic problems are encoding and separators. Excel on Windows assumes the file is in a local encoding, so UTF-8 characters turn into gibberish; tick "Include UTF-8 BOM" to fix that. The second problem is that some regional Excels expect semicolons instead of commas. Export with the right delimiter and BOM and both problems disappear.
How do I open JSON in Excel?
Excel cannot open JSON directly in most versions, so convert it to CSV first with this tool, then use File, Open in Excel and pick the CSV file. If your JSON is an array of objects you get one row per object. If it is an object wrapping a single array (like {"data": [...]}), the tool detects that and uses the inner array automatically.
What happens to values with commas or quotes?
They are quoted following the RFC 4180 standard: any field containing the delimiter, a quote, or a line break is wrapped in double quotes, and quotes inside the field are doubled. So x,y becomes "x,y" and say "hi" becomes "say ""hi""". Every spreadsheet app and CSV parser understands this format.