HomeFormattersDataJSON to CSV Converter

JSON to CSV Converter

Data

Convert a JSON array to CSV instantly — paste your JSON, choose a delimiter, and download or copy the output. Runs entirely in your browser.

Reviewed by the thecalcu.com team · Last updated August 1, 2026

What is a JSON→CSV?

A JSON to CSV Converter transforms a JSON array of objects into comma-separated values format, the tabular structure used by spreadsheets, databases, and data analysis tools. Every object in the JSON array becomes one row in the CSV, and the keys of those objects become the column headers.

JSON is ideal for hierarchical, nested data, APIs, configuration files, and application logs are all naturally expressed in JSON. CSV, on the other hand, is the lingua franca of tabular data: every spreadsheet, BI tool, and data import wizard can read it. When you need to move data from a JSON API response into Excel, Google Sheets, Airtable, or a SQL import, converting to CSV is the standard step.

This converter handles the conversion entirely in your browser, no upload, no server, no rate limits. It supports all four common delimiters (comma, semicolon, tab, pipe), automatically adds a header row from the JSON keys, and correctly escapes fields that contain the delimiter character or quotes. Nested objects are flattened using dot-separated key paths (e.g. address.city) so the output stays truly flat.

For the reverse operation, converting a CSV file into a JSON array, use the CSV to JSON Converter.


Why Use a JSON to CSV Converter?

Copying a JSON array into a spreadsheet manually is error-prone and slow, especially when the objects have many keys or inconsistent structures. A converter handles RFC 4180 quoting automatically, so you never end up with a broken CSV when a value contains a comma or a newline.

It also handles sparse data, when some objects in the array have keys that others lack, the converter collects the full union of keys and fills missing cells with empty strings rather than silently misaligning columns.


Who Should Use This Converter?

Data analysts, pulling API responses or database exports (often JSON) into Excel or Google Sheets for analysis, pivot tables, or charting.

Backend developers, exporting application data for non-technical stakeholders who need a spreadsheet rather than a JSON file.

Product managers and ops teams, converting user records, event logs, or configuration exports from JSON format into a spreadsheet they can filter and sort.

Students and learners, understanding the structural difference between JSON and CSV and how to move between them.

For formatting JSON without converting it, use the JSON Formatter. To convert XML data to JSON first and then to CSV, use the XML to JSON Converter followed by this tool.


What Does the JSON to CSV Converter Give You?

The output is a plain-text CSV string with one row per JSON object. The first row contains column headers (the union of all keys across all objects) unless you disable the header toggle. Fields containing the delimiter, double-quotes, or line breaks are automatically quoted per RFC 4180.

Nested object keys are flattened to dot notation, {"address": {"city": "Mumbai"}} becomes a column named address.city. Array values inside objects are serialised as their string representation.


How to use this JSON→CSV calculator

  1. Paste your JSON array into the JSON Array input field. The default shows a three-row example.
  2. Choose a Delimiter from the dropdown, comma is the default and works with most tools.
  3. Toggle Include header row on or off depending on whether you need column names.
  4. The CSV Output appears instantly as you type or change options.
  5. Click the Copy button to copy the CSV to your clipboard.
  6. Paste into a spreadsheet or save as a .csv file.

Formula & Methodology

Input requirements: A JSON array where each element is an object ([{}, {}, ...]). Arrays of primitives are also accepted and placed in a single value column.

Key collection: All keys across all objects are collected into an ordered set. The order follows the key order in the first object, with any additional keys from subsequent objects appended.

Flattening: Nested objects are recursively flattened. {"a": {"b": 1}} becomes {"a.b": 1}.

Field escaping (RFC 4180): A field is quoted if it contains the delimiter, a " character, a newline, or a carriage return. Inside quoted fields, " is escaped as "".

Before (JSON):
json [{"name": "Alice, Jr.", "score": 98}, {"name": "Bob", "score": 85}] 

After (CSV, comma delimiter):
name,score "Alice, Jr.",98 Bob,85

Frequently Asked Questions

The converter expects a JSON array of objects, for example, [{"name": "Alice", "age": 30}]. Each object becomes one CSV row. Simple arrays of strings or numbers are also handled by placing all values in a single 'value' column. Nested objects are flattened automatically using dot notation (e.g. 'address.city').
Nested objects are flattened using dot-separated key paths. For example, {"user": {"name": "Alice", "city": "Mumbai"}} produces columns named 'user.name' and 'user.city'. Arrays inside objects are converted to their string representation.
Yes by default, the first row of the CSV contains the column names taken from the JSON keys. You can turn this off using the 'Include header row' toggle if you need raw data only.
Any field containing the delimiter character, a double-quote, or a newline is automatically wrapped in double quotes per RFC 4180. Double-quote characters inside values are escaped by doubling them (""). This ensures the output is correctly parsed by Excel, Google Sheets, and standard CSV libraries.
Yes, choose from comma, semicolon, tab, or pipe from the Delimiter dropdown. Semicolon-delimited CSV is common in European locales where the comma is used as a decimal separator. Tab-delimited output (TSV) pastes directly into spreadsheet cells without any import wizard.
Nothing is transmitted. The conversion runs entirely in your browser using JavaScript. Your JSON is never sent to a server or stored anywhere, it stays on your device.
The converter collects all keys across all objects in the array and uses the union as the header row. Rows missing a particular key will have an empty cell for that column. This handles sparse or schema-inconsistent datasets correctly.
Yes, use the [CSV to JSON Converter](/csv-to-json-formatter/) which is the reverse of this tool. Both tools support custom delimiters and optional header rows.
The [JSON Formatter](/json-formatter/) pretty-prints or minifies JSON while keeping it as JSON. This tool converts JSON into a completely different format (CSV) suitable for spreadsheets and tabular data processing.
The tool works in the browser and handles files up to a few thousand rows comfortably. Very large files (hundreds of thousands of rows) may slow the browser due to the size of the text rendered in the output box, for those, a command-line tool like jq is more practical.
Yes. Copy the CSV output and paste it into a blank spreadsheet, or save it as a .csv file and open it directly. If your delimiter is a comma, Excel and Google Sheets will parse it without any import configuration. For semicolon-delimited files, use the 'Import' wizard and specify the delimiter.
Also known as
json to csv converterconvert json array to csvexport json as csvjson to spreadsheetflatten json to csv