Tools/Developer Tools/JSON to CSV Converter

JSON to CSV Converter – Flatten Nested JSON Online Free

Convert JSON arrays of objects into clean CSV files with nested-field flattening, schema detection, missing-key handling, and selectable columns.

About this tool

The most common scenario for JSON to CSV conversion is API data that needs to land in a spreadsheet. REST APIs return JSON, but business stakeholders work in Excel or Google Sheets.

This tool bridges that gap without a Python script or database query. It scans every record in your array to detect the full set of fields - including nested ones - so records with missing keys still produce a consistent CSV with those cells left blank rather than breaking the export.

Turn structured JSON records into spreadsheet-friendly CSV output quickly, without writing a script.

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 Schema

The tool scans records, flattens nested objects, and collects every available field.

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 to Excel

Export user data from a JSON API into Excel.

Analytics Reporting

Convert API analytics responses into CSV for reporting.

Webhook Logs

Transform webhook logs into spreadsheets.

Non-Technical Handoffs

Prepare JSON exports for non-technical team members.

Best For

  • Best for reporting, exports, ops workflows, and quick handoffs to non-technical teams.
  • Nested objects flatten into dot-notation columns automatically - for example user.name becomes its own column.
  • Column selection lets you drop fields you don't need before exporting, instead of cleaning up the CSV afterward.

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

Two columns come from the nested "user" object automatically (user.name), the missing "tags" field on the first record is left blank instead of breaking the export, and the array on the second record is joined with a pipe character since a single CSV cell can't hold a list.

Use Cases

Webhook and payment logs

Turn a Stripe or Shopify webhook payload into a spreadsheet a finance or ops teammate can open directly, without writing a script to parse it first.

Survey and analytics exports

Convert JSON exported from a survey tool or analytics API into CSV for further analysis in Excel or Google Sheets.

Handoffs to non-technical teammates

Export API data as CSV so a colleague who doesn't work with JSON can open, filter, and sort it like any other spreadsheet.

Common Mistakes

Problem

Expecting one row per array item

Solution

An array inside a record - "tags":["urgent","billing"] - is flattened into a single cell joined with a pipe character ("urgent | billing"), not split into separate rows. Restructure the JSON into one record per item first if you need one row per array entry.

Problem

Pasting JSON with syntax errors

Solution

This tool parses JSON directly, so the same strict rules apply as any JSON parser: no trailing commas, no single quotes, and keys must be double-quoted. Fix the syntax with the JSON Formatter first, then paste the corrected JSON back here.

Problem

Opening the CSV by double-clicking it in Excel

Solution

Double-clicking a CSV lets Excel guess the encoding, which can garble accented or non-English characters. Use Data > Get Data > From Text/CSV and select UTF-8 explicitly instead.

Problem

Assuming records with different fields will throw an error

Solution

The converter scans every record to build the full set of columns, so records missing a field simply get a blank cell in that column instead of failing the export.

Tips & Best Practices

Deselect columns you don't need before exporting

Use the column toggle buttons to drop fields from the output before downloading, instead of deleting columns in Excel after the fact.

Check the preview table before downloading

The tool shows up to 15 rows in the preview table so you can confirm the flattened columns and values look right before exporting the full file.

Fix JSON syntax errors with the JSON Formatter first

If conversion fails because the source JSON is invalid, format and validate it with the JSON Formatter, then paste the corrected version back here.

Limitations

Outputs CSV only, not a native .xlsx file

The download is a plain CSV file, not a formatted Excel workbook. To get an .xlsx file directly, use the JSON to Excel Converter instead.

No JSON Lines / NDJSON auto-detection

The tool expects a single JSON array or object, not newline-delimited JSON. Wrap NDJSON records in square brackets and separate them with commas before pasting.

No custom delimiter or quote character

Output always uses a comma delimiter with double-quote escaping - there's no option to switch to semicolons, tabs, or a different quote character.

Comparisons

JSON vs CSV

JSON stores nested key-value structures - objects inside objects, arrays of any depth - while CSV is flat: every row is the same fixed set of columns with no nesting.

JSONCSV
StructureNested objects and arraysFlat rows and columns
Best forAPIs, config files, structured data exchangeSpreadsheets, Excel, Google Sheets
Human-editable in Excel?NoYes

Which should you use?

Use JSON while the data stays inside code or an API; convert to CSV the moment a spreadsheet tool is the destination - which is exactly what this converter automates.

FAQs

The most common questions are about how nested data and inconsistent records get handled, and what happens when you open the result in Excel - both are covered below.

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.

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

This is a well-known Excel quirk, not a problem with the CSV file itself: double-clicking a CSV to open it doesn't always detect UTF-8 encoding correctly. Instead, open Excel first, then use Data > Get Data > From Text/CSV (or Data > Import) and explicitly choose UTF-8 as the file origin - the characters will display correctly.

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.

Can I convert JSON straight to an Excel file instead of CSV?

This tool only outputs CSV. If you need a native .xlsx file instead - for example to preserve multiple sheets or Excel-specific formatting - use the JSON to Excel Converter, which is a separate tool built specifically for that output format.

What does a real conversion look like?

For example, this JSON - [{"user":{"name":"Aisha"},"role":"admin"},{"user":{"name":"Omar"},"role":"editor","tags":["urgent","billing"]}] - produces three columns: user.name, role, and tags. The first row reads Aisha, admin, and a blank tags cell, since that record didn't have one. The second row reads Omar, editor, and urgent | billing - the array joined with a pipe character, since a single CSV cell can't hold a list.

What's the actual difference between JSON and CSV?

JSON stores nested key-value structures - objects inside objects, arrays of any depth - which makes it good at representing complex, hierarchical data. CSV is flat: every row is the same fixed set of columns with no nesting, which is exactly what spreadsheet software expects. Converting JSON to CSV means flattening that hierarchy, which is why nested objects and arrays need special handling instead of a direct one-to-one conversion.

Get more tools like this

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

Trending Tools

Trending tools will appear as visitors explore the catalog.

Recently Used

Your recently visited tools will show up here.