JSON Toolbox LogoJSONToolbox

JSON to CSV Converter

Convert JSON records to CSV online for Excel, Google Sheets, and other spreadsheet tools. Paste JSON or open a file, preview the detected columns, optionally flatten nested objects, and download a CSV file directly from your browser.

Result will appear here
All processing happens in your browser. No JSON is sent to our servers.

Key Features

JSON Records to CSV

Convert a JSON array of objects into CSV rows and columns. Each object becomes a record, and the detected fields are used as CSV headers.

Table Preview

Review the detected columns and converted rows before downloading. This helps you find missing fields, unexpected values, and flattening issues before exporting the file.

Flatten Nested Objects

Convert nested object properties into dot-notation columns such as user.name or address.city. Nested arrays may be serialized or require a separate transformation depending on their structure.

Select Exported Fields

Choose the columns to include in the CSV output when you only need selected fields from a larger JSON response or dataset.

CSV Formatting Options

Generate standard comma-separated output and correctly escape values containing commas, quotation marks, or line breaks. Use the available delimiter and encoding options supported by the page.

Spreadsheet-Friendly Download

Download the generated CSV file for use in Excel, Google Sheets, database imports, reporting workflows, or other applications that accept delimited text.

Paste or Open JSON

Paste JSON directly into the editor or open a .json file from your device. The input is parsed in the browser before the CSV is generated.

Browser-Based Processing

JSON parsing, table preparation, and CSV generation happen in your browser. The converter does not require an account or a server upload.

How to Use

1

Enter JSON data

Paste a JSON array of objects into the input field or open a .json file. API responses and exported records usually need to be reduced to the array that contains the rows.

2

Review the detected columns

Run the conversion and inspect the table preview. The converter collects fields across the records, so rows with different keys may produce empty cells in some columns.

3

Configure nested data and fields

Enable nested-object flattening when you need properties such as user.name or address.city as separate columns. Select only the fields you want to export when the dataset contains unnecessary properties.

4

Download the CSV

Review the converted rows, then download the CSV file. Open it in Excel or import it into Google Sheets and confirm the delimiter and character encoding if the spreadsheet displays unexpected characters.

Input
[
  { "name": "Alice", "age": 30, "city": "New York" },
  { "name": "Bob", "age": 25, "city": "London" }
]
Output
name,age,city
Alice,30,New York
Bob,25,London

How to Convert JSON to CSV for Excel and Google Sheets

What Is JSON to CSV Conversion?

JSON is commonly used for APIs, application data, configuration, and database exports. CSV is a flat, delimited format that works well with spreadsheets, reporting tools, and simple data-import workflows. Converting JSON to CSV is useful when you need to inspect records as rows and columns rather than as nested objects.

The most suitable JSON input is a top-level array of objects. Each object represents one record, and its properties become CSV fields. Because CSV has only two dimensions, nested objects and arrays need an explicit representation before they can be exported.

Common Use Cases

  • API data analysis: Convert a JSON API response into a spreadsheet for filtering, review, charts, or reporting.
  • Database and application exports: Turn JSON records into a format that can be opened by spreadsheet or import tools.
  • Manual review: Display structured records as rows and columns for quality assurance, auditing, or content checks.
  • Data migration: Prepare a flat file for a system that accepts CSV rather than JSON.
  • Spreadsheet workflows: Move JSON data into Excel or Google Sheets without installing a separate conversion program.

How to Convert JSON to CSV

  1. Enter the JSON: Paste a JSON array of objects or open a .json file.
  2. Detect the records: Confirm that the input array represents the rows you want to export. If the data is wrapped in an object, locate the relevant records array first.
  3. Configure nested fields: Enable flattening for nested objects if you want paths such as user.name and address.city to become separate columns.
  4. Review columns: Inspect the detected headers, row count, and table preview. Remove fields you do not want to export when field selection is available.
  5. Download the CSV: Generate and save the CSV file, then open it in Excel or import it into Google Sheets.

Flattening Nested JSON

Nested objects cannot be placed directly into a flat spreadsheet cell without choosing a representation. A common approach is to flatten object paths with dot notation:

{"user":{"name":"Alice","address":{"city":"New York"}},"status":"active"}

After flattening, the fields may become user.name, user.address.city, and status. This works well for nested objects, but nested arrays need separate rules. They may be serialized as JSON text, joined into a single cell, expanded into columns, or handled as additional rows depending on the conversion design.

Different Keys and Missing Values

Real-world records often do not share exactly the same fields. A converter can scan the records and create a union of the discovered keys. When one record does not contain a field, the corresponding CSV cell is empty. This preserves the row alignment but may create a wide spreadsheet when the source data contains many optional properties.

CSV Escaping Rules

CSV values containing commas, double quotes, or line breaks need special handling. A value containing a comma is normally enclosed in double quotes, and an internal double quote is escaped by doubling it. Correct escaping is important when names, descriptions, addresses, or API fields contain punctuation or multiline text.

CSV is a relatively simple format, but spreadsheet programs may differ in their assumptions about delimiters, line endings, character encoding, and formula interpretation. Test a representative sample before distributing a large export.

Opening CSV Files in Excel

For multilingual data, UTF-8 is usually the most interoperable encoding. Microsoft documents that a UTF-8 CSV saved with a BOM can be opened correctly in Excel, while files without a BOM may need to be imported through Excel's data or text-import workflow with UTF-8 selected manually.[164][166]

A BOM can improve direct opening in some Excel environments, but it is not a universal solution for every spreadsheet application. If the file still displays incorrectly, use the import dialog and explicitly select UTF-8 and the correct delimiter.

JSON to CSV Limitations

  • Nested data: Objects and arrays need flattening, serialization, or another mapping rule.
  • Type information: CSV does not preserve JSON object and array types in the same way as JSON.
  • Null values: Null may become an empty cell or a literal value depending on the converter's rules.
  • Large payloads: Browser memory and rendering time can limit the practical size of a client-side conversion.
  • Formula-like values: Spreadsheet applications may interpret values beginning with characters such as =, +, -, or @ as formulas. Treat untrusted exports carefully and consider formula-injection protection when exporting data for other users.

Browser-Based Privacy

This converter is designed to process JSON and create CSV in the browser rather than sending the source data to a remote conversion service. That can be useful for internal records and development data. However, a browser-based tool should not be treated as a secure secret-management system. Avoid entering credentials, tokens, private customer data, or production secrets into any online converter.

When to Keep JSON Instead

CSV is useful for flat records and spreadsheet workflows, but JSON is usually a better choice when nested structure, arrays, exact data types, or machine-to-machine interchange must be preserved. If converting to CSV would create many ambiguous columns or lose important relationships, keep the original JSON or use a format designed for nested data.

Related Articles

Related Tools

Frequently Asked Questions

How do I convert JSON to CSV for Excel?

Paste a JSON array of objects or open a JSON file, review the detected columns, and download the generated CSV. If Excel displays non-ASCII characters incorrectly, use a UTF-8 CSV with BOM when available or import the file through Excel's text import workflow and choose UTF-8.

What JSON structure works best for CSV conversion?

The most suitable input is a top-level array of objects, where each object represents one row. For example: [{"name":"Alice","age":30},{"name":"Bob","age":25}].

Can I convert a JSON object instead of an array?

The page is primarily designed for arrays of records. If your data is wrapped in an object such as {"results":[...]}, extract the records array before converting. A single object can be treated as one record only if that behavior is supported by the current implementation.

Does it support nested JSON objects?

Yes. When flattening is enabled, nested objects can become dot-notation columns such as user.name and address.city. This creates a flat structure that is easier to import into a spreadsheet.

How are nested arrays handled?

A CSV file has rows and columns, so nested arrays do not always have a single natural representation. Depending on the implementation, an array may be serialized into one cell, joined into text, expanded into additional columns, or require a separate transformation.

How are JSON objects with different keys handled?

The converter can collect fields across the input records and use them as column headers. If a record does not contain a particular field, its cell remains empty.

Can I choose which JSON fields to export?

Yes, if field selection is enabled in the interface. After the columns are detected, select the fields you want to keep and exclude unnecessary or sensitive properties from the CSV output.

Does the converter support API responses?

Yes, when the API response contains a JSON array of records or a wrapper object with a records array. If the response is nested, identify the array that represents the rows before starting the conversion.

How are commas, quotes, and line breaks escaped?

CSV values containing commas, quotation marks, or line breaks must be quoted and escaped according to common CSV rules. Review the preview or open a small test export in your target spreadsheet application before processing a large dataset.

Can I use the CSV in Google Sheets?

Yes. Download the CSV and import it into Google Sheets. UTF-8 is normally the safest choice for multilingual data, while the import dialog can also be used to choose the correct separator and character encoding.

Why are Chinese characters or accented characters garbled in Excel?

Excel may interpret a CSV using the wrong character encoding when the file is opened directly. A UTF-8 CSV with a BOM is commonly recognized correctly by Excel; alternatively, import the file through Excel's data import workflow and select UTF-8 manually.

Can I convert a large JSON file?

This page converts small and medium documents (up to 5 MB). Above that it does not try to parse the file — it hands the content over to the Large JSON Explorer, which scans big files in a Web Worker and exports CSV from them. The content is carried over automatically, so you do not upload it twice.

Is my JSON data uploaded to a server?

This page is designed to parse the input and generate CSV in your browser without requiring a server upload. You should still avoid entering passwords, API keys, access tokens, personal information, or confidential production data into any browser-based tool.

Is this a free JSON to CSV converter?

Yes. You can paste JSON or open a file, review the converted data, and download a CSV without creating an account.