Free Converter

JSON to CSV Converter

Convert JSON arrays or objects to CSV format instantly in your browser. Supports custom delimiters, quotes, and large datasets.

About JSON to CSV Conversion

Going from JSON to CSV flattens hierarchical data into a tabular form. JSON's strength is that it can describe nested objects, arrays of varying length, and rich type information; CSV's simpler structure cannot express any of that natively. The conversion therefore involves choices: which fields become columns, how nested objects are flattened (using dot notation like address.city), and what to do with arrays inside records.

This converter handles the common case — an array of flat objects with consistent keys — directly: each object becomes a row, the union of keys across all objects becomes the column set, and missing fields become empty cells. For nested data, the converter offers a flatten option that joins nested keys with dots, producing column headers like user.name, user.email, address.zip.

PapaParse generates the CSV output, applying proper quoting for fields containing commas, newlines, or quote characters. The output is RFC 4180 compliant and opens cleanly in Excel, Google Sheets, and any other CSV-aware tool.

Why Convert JSON to CSV

Spreadsheets are still the universal data format for non-developers. Sales teams, finance teams, marketing teams, and most other business functions live in Excel or Google Sheets, and asking them to consume JSON directly is asking them to read a programmer's data format. Converting JSON to CSV bridges from API outputs and database exports into the form business users actually open.

CSV is also the most reliable format for importing into legacy systems. Older CRM imports, accounting software, and analytics tools accept CSV but not JSON. Converting before import is often the only path.

How to Convert JSON to CSV

Paste or upload JSON, choose flattening, get CSV.

  1. Add your JSON: Paste JSON text into the input area or drop a .json file. The input must be a JSON array of objects (or a JSON object containing such an array). Other shapes produce limited output.
  2. Choose flattening: Disable to keep only top-level fields (nested objects are stringified). Enable to flatten nested objects into dot-separated columns (user.name, user.email).
  3. Convert: The converter walks the JSON array, collects the union of keys, and writes one row per object. PapaParse handles quoting and escaping for the CSV output.
  4. Download or copy: Save as .csv or copy to clipboard. The output opens in Excel, Sheets, or any other CSV consumer.

Common Use Cases

Technical Details

The converter expects a JSON array of objects. For each object, the union of all keys across the array is computed and used as the column header set. Each object is written as one row, with empty values for keys it does not contain.

When flattening is enabled, nested objects are recursively walked: { user: { name: 'A', email: 'B' } } becomes columns user.name and user.email. Arrays inside objects are stringified (turned back into JSON text) since CSV cannot natively represent multiple values per cell.

PapaParse's unparse function generates the CSV output. Fields containing commas, newlines, or quotes are wrapped in double quotes, with internal quotes escaped by doubling. The output uses CRLF line endings and includes the header row by default.

Best Practices

Frequently Asked Questions

What input formats are accepted?
JSON arrays of objects work best (e.g., [{a:1,b:2},{a:3,b:4}]). The converter can also handle a JSON object containing a single array property; the array is extracted and converted. Nested objects can be flattened or preserved as JSON-string columns.
How are nested objects handled?
With flattening enabled, nested objects become dot-separated columns: user.address.city. With flattening disabled, nested objects are stringified into a single CSV cell.
How are arrays inside objects handled?
Arrays are stringified into a single CSV cell as JSON text. Native CSV does not support multiple values per cell, so this is the standard workaround.
Will the CSV open correctly in Excel?
Yes for ASCII data. For data containing non-ASCII characters, ensure the CSV is saved as UTF-8 with a BOM, otherwise Excel may misinterpret characters.
Is my data uploaded to a server?
No. The conversion runs in your browser using PapaParse.
What about objects with different keys in the same array?
The CSV header is the union of all keys. Objects missing a particular key produce empty cells in that column. The CSV remains valid, just sparse.
Can I convert back from CSV to JSON?
Yes — use the CSV to JSON tool. The round trip can be lossless for flat data; nested data may need normalization.
What is the maximum size?
Up to 50 MB of JSON input. Larger files may slow down due to browser memory.