Tools/Developer Tools/JSON to CSV Converter

JSON to CSV Converter – Flatten Nested JSON Online

Convert a JSON array of objects to CSV. Nested fields become dot-notation columns, missing keys become empty cells, and you choose which columns to export.

If this tool isn’t working as expected, please take a screenshot of the error and report the problem here so we can investigate and improve it.

About this tool

Use it to convert JSON to CSV: paste a JSON array of objects, or load a .json file, and each object becomes one CSV row. Nested objects are flattened into dot-notation columns such as user.name, the column list is the union of the keys across every record so records with missing keys get empty cells, and you can switch columns off before copying or downloading.

Parsing and conversion happen in your browser.

A CSV cell can't hold a nested object, so the converter decides how each shape maps to one cell. Objects become dot-notation columns; an array inside a record is joined into one cell with " | " (an array of objects becomes compact JSON strings joined the same way), so every record stays exactly one row.

How to Use JSON to CSV Converter

Paste or Upload JSON

Paste a JSON array of objects or upload a .json file from your device.

Detect Columns

The tool scans every record, flattens nested objects, and collects each field it finds.

Select Columns

Choose exactly which fields should appear in the CSV output.

Copy or Download CSV

Preview the table, copy the CSV text, or download the final .csv file.

Common Workflows

API data for a spreadsheet

Paste the JSON a REST API returned and export CSV for Excel or Google Sheets. Nested fields come out as their own columns.

Converting a saved .json file to CSV

Upload the .json file, switch off the columns your finance or ops teammate doesn't need, and download the CSV.

Trimming columns before you share

Turn off internal IDs or personal data before you copy or download. The preview table shows the first 15 rows so you can check the result.

Fixing JSON that won't convert

If the converter says the JSON is invalid, find the error in the JSON Formatter, then paste the corrected text back.

Examples

Flatten nested records with a missing key

JSON

[{"user":{"name":"Aisha"},"role":"admin"},{"user":{"name":"Omar"},"role":"editor","tags":["urgent","billing"]}]

CSV

user.name,role,tags
Aisha,admin,
Omar,editor,urgent | billing

user.name comes from the nested object, the first record's missing tags field becomes an empty cell, and the array on the second record is joined with " | " so the record stays on one row.

Commas and line breaks inside a value

JSON

[{"note":"Hello, world","address":"1 Main St\nSuite 4"}]

CSV

note,address
"Hello, world","1 Main St
Suite 4"

A value that contains a comma, a double quote or a line break is wrapped in double quotes (with any inner quotes doubled), so spreadsheet software reads it as a single cell.

Limitations

No JSON Lines (NDJSON)

The tool expects one JSON array or object. If your data has one object per line, wrap the lines in square brackets and add commas between them first.

A fixed CSV format

Columns are separated by commas, values are quoted with double quotes, and rows end with a line feed. There's no option for semicolons, tabs or other quote characters.

FAQs

These cover how nested data, arrays and uneven records are mapped, and how to open the result in Excel.

Can this tool flatten nested JSON before exporting to CSV?

Yes. Nested objects are flattened into dot-notation columns such as user.name so they can be exported cleanly to CSV.

What happens if some JSON objects have missing keys?

The converter builds a union of all detected keys and leaves missing values empty in the generated CSV output.

Can I choose which JSON fields appear in the CSV?

Yes. After parsing your JSON, the tool lists all detected fields and lets you toggle columns before copying or downloading the CSV.

What happens to arrays inside my JSON records?

Array values are joined into a single cell, separated by " | " characters, so each record still maps to exactly one CSV row instead of expanding into multiple rows. If an array contains objects rather than plain values, each object is converted to a compact JSON string before joining. If your source data is newline-delimited JSON (one object per line, no surrounding array), wrap it in square brackets and add commas between records first - the tool expects a single JSON array or object, not NDJSON.

What shapes of JSON does it accept?

A JSON array of objects, or a single object, which becomes one row. Every item in an array must be an object: a list of numbers or strings can't be turned into named columns, and the converter tells you which item is the problem. A bare string, number or true/false at the top level isn't accepted.

Why do accented or non-English characters look garbled when I open the CSV in Excel?

Excel doesn't reliably detect UTF-8 when you double-click a CSV. Tick "Add a UTF-8 byte-order mark to the download" before downloading and Excel will read the file as UTF-8. Alternatively, open Excel first, use Data > Get Data > From Text/CSV, and choose UTF-8 as the file origin.

Can I get an .xlsx file, or convert CSV back to JSON?

This tool outputs CSV only. For a native .xlsx file use the JSON to Excel Converter; for the opposite direction use the CSV to JSON Converter.

Is my JSON data uploaded to a server?

No. Parsing, field detection, flattening, and CSV generation all happen in your browser - your JSON file or pasted data is never sent anywhere. There's no hard file-size limit in the tool itself, though very large files are ultimately bounded by your device's available memory since everything is processed locally.

Get more tools like this

Leave your email so we can prioritize similar tools and updates.