📊

JSON to CSV Converter

Convert a JSON array of objects into CSV format. Preview the table, copy the CSV, or download it as a file.

CSV Output
Table Preview

About JSON to CSV Converter

This tool converts a JSON array of objects into a CSV (Comma-Separated Values) file. The first object's keys become the CSV headers, and each object becomes a row. The resulting CSV can be opened in Excel, Google Sheets, or any spreadsheet application.

Input Format

The input must be a JSON array of flat objects where each object shares the same keys. Nested objects or arrays in values will be serialized as JSON strings within the CSV cell.

How to Use

  1. Paste your JSON array into the input area.
  2. The tool validates the JSON and shows any errors.
  3. Click Convert to CSV - the CSV output appears below.
  4. Click Download CSV to save the file.

How It Works

The JSON array is parsed and each object's keys are used as CSV column headers (the union of all keys across all objects). Each object becomes one CSV row, with values quoted if they contain commas or newlines.

Example

JSON: [{"name":"Alice","score":95},{"name":"Bob","score":82}]
CSV: name,score\nAlice,95\nBob,82
Open the downloaded CSV in Excel or Google Sheets for analysis.

FAQ

The tool uses the union of all keys across all objects as the CSV headers. Missing values for a given row are left as empty cells.
Values containing the delimiter character or double quotes are automatically wrapped in double quotes, and any internal double quotes are escaped as per the RFC 4180 CSV standard.
Deeply nested structures don't map naturally to flat CSV. Nested objects and arrays are stringified into a single cell. For best results, flatten your JSON before converting, or use JSON to XML for hierarchical output.
No. All conversion happens in your browser. Your data never leaves your device.