JSON to CSV (Nested)

Convert nested JSON objects to flat CSV rows with dot-notation keys for nested fields.

  1. Home
  2. Utility
  3. JSON to CSV (Nested)

Rows: 0 Columns: 0

Paste JSON above to generate flat CSV.

What Is JSON to CSV (Nested) Conversion?

Nested JSON to CSV conversion is the process of taking complex, hierarchical JSON data with nested objects and arrays and flattening it into a flat, tabular CSV format. While flat JSON arrays convert trivially to CSV, deeply nested structures require a strategy to represent each nested field as a column with a dot-notation key (e.g., address.city, address.zip).

This is particularly useful when you need to import hierarchical API responses into spreadsheet applications like Excel or Google Sheets, load data into relational databases, or share structured data with non-technical stakeholders who need a simple row-and-column view. Data analysts, backend developers, and ETL pipeline engineers commonly use this conversion for data migration, reporting, and integration tasks.

The tool automatically detects nested objects and arrays in your JSON, flattens object keys using dot notation, and expands array fields into separate rows. Empty values are handled gracefully, and you can customize the CSV delimiter and quoting behavior to match your target system's requirements.

How to Use This Nested JSON to CSV Converter

  1. Paste JSON — Enter a JSON array of objects with nested data into the input textarea. You can use the Load Sample button to try with example data.
  2. Configure options — Choose your CSV delimiter (comma, semicolon, or tab), toggle Quote all fields to wrap every value in quotes, and enable Include empty columns to keep columns for fields that may be missing in some objects.
  3. Generate CSV — The output table appears automatically. Review the row and column counts displayed above the output.
  4. Copy the result — Click Copy CSV to copy the flattened data to your clipboard, then paste it into Excel, Google Sheets, or any CSV-compatible application.

Frequently Asked Questions

How are nested objects handled in the CSV output?

Nested objects are flattened using dot notation. For example, a JSON object {"user": {"name": "John", "age": 30}} becomes two columns: user.name and user.age. This preserves the hierarchical relationship in a flat structure.

What happens when the JSON contains arrays?

Arrays of primitive values are represented as comma-separated strings in a single cell. Arrays of objects are expanded: each object in the array generates a separate CSV row, duplicating the parent object's scalar fields across rows.

Can I convert a single JSON object (not an array)?

Yes. A single JSON object is treated as a one-row array, producing a CSV with one data row and one header row.

What delimiter should I use for my CSV?

Comma is the standard delimiter, but some European spreadsheet applications expect semicolons because commas are used as decimal separators. Tab-delimited output is useful when your data contains commas or semicolons.

Does this tool handle JSON with mixed field types?

Yes. The tool treats all values as strings for CSV output. If a field has different types across objects (e.g., sometimes a string, sometimes a number), the value is still included in its string representation.

Last updated: 9 Jul 2026