Free online tool

JSON to CSV Converter

Turn JSON arrays and nested objects into downloadable CSV in seconds. No signup and no upload required.

Convert JSON to CSV

Your data is processed locally and never uploaded to our servers.

How to convert JSON to CSV

  1. Paste your JSON into the input field or load the example.
  2. Select Convert to CSV.
  3. Copy the result or download it as a CSV file.

Supported JSON structures

The converter accepts arrays of objects, a single object, primitive arrays, and API responses where a record array is wrapped inside one or more container properties. Arrays of similarly structured objects produce the most predictable spreadsheet output.

How nested JSON becomes columns

Nested property names are joined with a double underscore. For example, address.city becomes the CSV header address__city. Columns are collected from every generated record, so properties that appear later in the input are preserved.

How arrays become CSV rows

Nested array items are expanded into separate rows while their parent values are repeated. If a record contains multiple sibling arrays, the converter creates the combinations needed to keep every leaf value. Empty nested arrays add no column and do not remove the parent row.

Nested JSON to CSV example

This input contains a nested address object:

[
  {
    "name": "Ada Lovelace",
    "address": { "city": "London" },
    "active": true
  }
]

The nested property is flattened into its own column:

name,address__city,active
Ada Lovelace,London,true

CSV escaping and missing values

Values containing commas or double quotes are escaped using standard CSV quoting. Missing properties become empty cells, while explicit JSON null values are written as null. Line breaks inside text values are normalized to spaces.

Opening the result in a spreadsheet

The downloaded UTF-8 CSV uses a comma as its delimiter and can be imported into Excel, Google Sheets, LibreOffice Calc, database tools, and data-analysis software. If your spreadsheet expects a different regional delimiter, use its import dialog and choose comma explicitly.

Privacy and processing limits

Conversion runs entirely in your browser: JSON input and CSV output are not uploaded to our servers. The tool accepts up to 5 MB of JSON to reduce the risk of an unresponsive browser tab. Deeply nested arrays can generate many row combinations even when the source file is small.

When JSON to CSV is useful

  • Opening API responses in Excel or Google Sheets.
  • Preparing JSON exports for reporting and data analysis.
  • Importing structured records into software that accepts CSV.
  • Reviewing nested records in a flat, tabular format.

Frequently asked questions

Is my JSON uploaded?

No. The converter processes the input locally in your browser.

Can the converter handle nested objects?

Yes. Nested keys are represented as double-underscore CSV headers, such as address__city.

Which JSON shape works best?

An array of similarly structured objects produces the most predictable CSV output.

Prefer Portuguese? Use esta ferramenta em português.

How the tool works

Paste a valid JSON array or an object containing records, then convert it to CSV. The converter discovers the available fields, creates a stable column set, flattens nested object keys with double underscores, and writes one CSV row for each record. You can inspect, copy, or download the result without installing spreadsheet software.

Supported input and output

An array of similarly shaped objects gives the clearest result. A wrapper object can also work when it contains a record array. Nested objects become separate columns, missing properties become empty cells, and values containing commas, quotes, or line breaks are escaped according to CSV rules.

Practical example

A response such as [{"name":"Ada","address":{"city":"London"}}] produces columns named name and address__city. This makes the output practical for Excel, Google Sheets, database imports, analytics tools, and systems that cannot directly consume nested JSON.

Common use cases

Common uses include converting an API response to a spreadsheet, preparing JSON exports for analysts, creating CSV fixtures, and reviewing selected records in tabular form. Because processing stays in the browser, the converter is also useful for private test data that should not be uploaded to a third-party conversion service.

Limits and important checks

JSON and CSV represent data differently, so some structure is necessarily simplified. Deeply nested arrays may be serialized rather than expanded into independent tables, and objects with very different fields can produce many sparse columns. Review the output before importing it into a production database or spreadsheet workflow.

Privacy and local processing

Unless the tool explicitly identifies an external lookup, input and generated output are processed in your browser and are not uploaded to CosmoTools. Avoid placing secrets in any web page and review downloaded results before using them in production.