JSON to CSV Converter

This JSON to CSV converter transforms JSON data into comma-separated value format for use in spreadsheets. Paste your JSON array or object to get a properly formatted CSV file with automatic key extraction, nested data flattening, and header generation.

JSON to CSV Converter

Convert JSON arrays of objects to CSV format

Frequently Asked Questions

How do you convert JSON to CSV?

To convert JSON to CSV, extract the keys from JSON objects to create CSV headers, then map each object's values to a corresponding row. For a JSON array like [{"name":"Alice","age":30}], the output is a CSV with 'name,age' as the header row and 'Alice,30' as the data row. Our tool handles this automatically, including nested object flattening.

Can nested JSON be converted to flat CSV?

Yes, nested JSON can be flattened into CSV format. Nested properties are typically represented using dot notation in column headers. For example, {"user":{"name":"Alice","address":{"city":"NYC"}}} becomes columns 'user.name' and 'user.address.city'. Arrays within objects can be joined as comma-separated values or split into multiple columns.

How are JSON arrays handled in CSV conversion?

When a JSON property contains an array, there are several approaches: the array can be serialized as a JSON string in a single CSV cell, joined with a delimiter (like semicolons), or expanded into multiple numbered columns (e.g., 'tags.0', 'tags.1'). The best approach depends on how the CSV will be used downstream.

What happens to null values in JSON to CSV?

Null values in JSON are typically converted to empty cells in CSV output. The string 'null' is not inserted because it could be confused with actual text data. Similarly, undefined properties in some JSON objects (when objects have different shapes) result in empty cells for those columns. Boolean values are converted to their string representations 'true' and 'false'.

How do you export JSON to Excel?

To get JSON data into Excel, first convert it to CSV format using a JSON to CSV converter. Then open the CSV file in Excel, which will automatically parse the comma-separated data into columns. Alternatively, Excel can directly import JSON via Power Query (Get Data > From JSON), which handles nested structures and data type detection automatically.

What is JSON flattening?

JSON flattening is the process of converting a nested, hierarchical JSON structure into a flat, single-level object. Each nested path becomes a dot-separated key. For example, {"a":{"b":{"c":1}}} flattens to {"a.b.c":1}. This is essential for CSV conversion because CSV is inherently a flat, tabular format that cannot represent hierarchy directly.

Which is more efficient, JSON or CSV?

CSV is more space-efficient for flat, tabular data because it has minimal overhead (just commas and newlines). JSON repeats key names for every object, adding significant overhead. However, JSON is more efficient for sparse data (where many fields are empty) and complex nested structures. For a dataset with 10 columns and 1000 rows, CSV can be 30-50% smaller than the equivalent JSON.

JSON to CSV Converter

About the JSON to CSV Converter

The JSON to CSV Converter transforms JSON arrays of objects into CSV (Comma-Separated Values) format. CSV is widely used for data exchange between applications, spreadsheets, and databases. This tool handles nested objects by flattening them with dot notation, ensuring all your data is preserved in the conversion.

How to Use

  1. Paste your JSON array of objects into the input field
  2. Select your preferred delimiter (comma, tab, or semicolon)
  3. Toggle whether to include column headers in the output
  4. The CSV output is generated in real time
  5. Copy the result to clipboard or download as a .csv file

Features

  • Real-time conversion as you type or paste
  • Automatic flattening of nested objects using dot notation
  • Proper CSV escaping for fields containing delimiters, quotes, or newlines
  • Multiple delimiter options: comma, tab, and semicolon
  • Optional header row inclusion
  • One-click copy and file download

Handling Nested Objects

When your JSON contains nested objects, the converter flattens them using dot notation. For example:

{ "user": { "name": "Alice", "address": { "city": "NYC" } } }

Becomes columns: user.name, user.address.city

Arrays within objects are serialized as JSON strings to preserve their structure in the CSV output.

Delimiter Options

  • Comma (,) — Standard CSV format, compatible with most applications
  • Tab — TSV format, useful when data contains commas
  • Semicolon (;) — Common in European locales where comma is used as decimal separator

Common Use Cases

  • Exporting API response data to spreadsheets
  • Preparing data for import into databases
  • Converting configuration data for analysis tools
  • Transforming log data for reporting
  • Data migration between systems using different formats