JSON to CSV Converter

Convert JSON arrays to CSV with nested object flattening using dot notation.

Input
Delimiter:
Output

How to Convert JSON to CSV

  1. Paste a JSON array of objects into the input panel. Each object in the array becomes one row in the CSV output.
  2. Choose a delimiter — comma is the default, but you can select tab (for TSV), semicolon (common in European locales), or pipe depending on your needs.
  3. Click “Convert” to generate the CSV. The tool automatically extracts column headers from all object keys and flattens nested objects using dot notation.
  4. Review the output in the right panel. Each row corresponds to one JSON object, with nested fields accessible via dotted column names.
  5. Download or copy — click “Download” to save as a .csv file, or use the copy button to paste into a spreadsheet or another tool.

What is JSON to CSV Conversion?

JSON to CSV conversion transforms structured JSON arrays into flat, tabular CSV (Comma-Separated Values) format. JSON is the standard data format for APIs and web applications, but many tools — spreadsheets, databases, data analysis scripts, and business intelligence platforms — work best with tabular CSV data. This converter bridges that gap by extracting keys as column headers and values as row data.

The key challenge in JSON-to-CSV conversion is handling nested structures. Unlike CSV, JSON supports objects within objects and arrays within arrays. This tool solves that by flattening nested objects with dot notation (e.g., address.city) so no data is lost. If you need to go the other direction, use the CSV to JSON converter.

Examples

1. Flat array to CSV

A simple array of flat objects converts directly to clean CSV:

[
  { "id": 1, "name": "Alice", "email": "alice@example.com" },
  { "id": 2, "name": "Bob", "email": "bob@example.com" },
  { "id": 3, "name": "Charlie", "email": "charlie@example.com" }
]

Output:

id,name,email
1,Alice,alice@example.com
2,Bob,bob@example.com
3,Charlie,charlie@example.com

2. Nested objects with dot notation flattening

When your JSON contains nested objects, the converter flattens them automatically:

[
  {
    "id": 1,
    "name": "Alice",
    "address": { "city": "London", "country": "UK" }
  },
  {
    "id": 2,
    "name": "Bob",
    "address": { "city": "Paris", "country": "France" }
  }
]

Output:

id,name,address.city,address.country
1,Alice,London,UK
2,Bob,Paris,France

3. Using a custom delimiter

Select the Tab delimiter to produce TSV output, which pastes cleanly into Excel and Google Sheets:

id	name	email
1	Alice	alice@example.com
2	Bob	bob@example.com

Semicolons are useful when your data contains commas (e.g., addresses, descriptions) to avoid escaping issues.

Common Use Cases

  • Importing API data into spreadsheets: Convert REST API responses to CSV for analysis in Excel, Google Sheets, or LibreOffice Calc.
  • Database exports: Transform JSON data dumps into CSV for bulk import into SQL databases using LOAD DATA or COPY commands.
  • Data analysis pipelines: Convert JSON to CSV for processing with pandas, R, or other data analysis tools that prefer tabular input.
  • Report generation: Turn JSON metrics or user data into CSV tables for business reports and dashboards.
  • ETL workflows: Use as the transform step to flatten nested JSON from APIs before loading into data warehouses.
  • Log processing: Convert structured JSON log entries into CSV for import into log analysis tools.
  • Data sharing: CSV is the universal data exchange format — convert JSON for colleagues who work in non-technical tools.

Frequently Asked Questions

How does it handle nested objects?

Nested objects are flattened using dot notation. For example, {"address": {"city": "London"}} produces a column named address.city with the value London. This works for any depth of nesting, so deeply nested structures are fully preserved in the CSV output.

What about arrays within objects?

Arrays of primitive values (strings, numbers) are serialized as JSON strings within the CSV cell. For example, {"tags": ["js", "react"]} becomes a cell containing [“js”,“react”]. Arrays of objects are flattened with index notation like items[0].name.

Can I change the delimiter?

Yes. The tool supports four delimiters: comma (default), tab, semicolon, and pipe. Tab-separated values are useful for pasting into spreadsheets, while semicolons are standard in European locales where commas are decimal separators.

What is the maximum file size?

Because processing runs entirely in your browser, the limit depends on your device’s available memory. Most modern browsers handle JSON arrays with tens of thousands of rows (up to about 50 MB) without issues. For very large datasets, consider command-line tools like jq or Miller.

Does it preserve column order?

Yes. Columns appear in the order that keys are first encountered in the JSON. The first object determines the initial column order, and any additional keys from subsequent objects are appended to the end.

Can I convert CSV back to JSON?

Absolutely. Use the CSV to JSON converter on this site to reverse the process. It handles quoted fields, custom delimiters, and automatically maps CSV headers back to JSON keys. You can also format the JSON output for readability.

Privacy & How It Works

This JSON to CSV converter processes everything locally in your browser. When you click Convert, the tool parses your JSON using JSON.parse(), walks the object tree to extract and flatten all keys, builds a CSV header row, and then maps each array element to a data row. No data is uploaded to any server, no cookies are set, and nothing is stored after you close the tab. The download feature uses a client-side Blob URL to generate the .csv file directly in your browser. This makes it safe for sensitive data including customer records, financial data, and internal business metrics.