JSON to CSV Converter - Convert JSON to CSV for Excel

Convert JSON arrays of objects into spreadsheet-ready CSV files locally in your browser. Automatically flattens nested objects with dot notation, renders a live preview table, and adds UTF-8 BOM on .csv downloads so Excel opens characters cleanly.

JSON to CSV Converter

How to use the JSON to CSV Converter

  1. 1Paste a non-empty JSON array of objects into the JSON Array Input textarea, or click Upload .json File to load a local .json file.
  2. 2Select Comma (,), Semicolon (;), or Tab in the Delimiter dropdown to match your spreadsheet tool.
  3. 3Inspect the live Table Preview below the text boxes to confirm flattened column headers and aligned cell values look accurate.
  4. 4Click Copy to copy the generated CSV text, Download .csv to save converted.csv with UTF-8 BOM encoding, or Clear to reset.

What the JSON to CSV Converter does

The converter flattens structured JSON arrays into tabular CSV lines strictly inside your browser without uploading files anywhere:

  • Recursively flattens nested child objects into dot-separated header names (such as meta.city and meta.plan) while serializing nested arrays as JSON strings.
  • Gathers the complete union of keys across every record in the JSON array and leaves empty cells where optional properties are omitted.
  • Displays a scrollable Table Preview showing up to the first 20 flattened rows directly on the page before you export.
  • Escapes cells containing delimiters, double quotes, or line breaks cleanly, and prepends a UTF-8 byte order mark (BOM) when saving converted.csv so Excel displays characters reliably.
  • Validates that input is a non-empty JSON array of objects and surfaces clear syntax or structure errors above the editor.

Example

Sample nested JSON input
[{"id":1,"user":{"name":"Alex","city":"Austin"}},{"id":2,"user":{"name":"Nadia","city":"Dhaka"}}]
Flattened CSV output
id,user.name,user.city
1,Alex,Austin
2,Nadia,Dhaka

The nested user object expands automatically into separate user.name and user.city columns in both CSV Output and the Table Preview.

Frequently asked questions

What JSON structure works best for CSV conversion?

A non-empty JSON array of objects (such as [{"id":1,"name":"Alex"},{"id":2,"name":"Sam"}]) works best because object keys map directly to spreadsheet column headers. Arrays of plain values or single objects can trigger a format error.

How are nested JSON objects handled?

Nested objects are automatically flattened with dot notation—for example, {"user":{"city":"Dhaka"}} becomes a column named user.city. Embedded arrays inside cells are preserved as compact JSON strings.

Will the downloaded CSV open properly in Microsoft Excel?

Yes. Download .csv prepends a UTF-8 BOM (byte order mark) and properly quotes fields with commas or newlines so Excel displays accented characters and column boundaries cleanly.

What if different objects in the JSON array have missing keys?

The converter collects the union of all keys across every record in the array and fills missing cells with empty strings so columns stay aligned.

Related tools

View All Tools