Skip to content

JSON to CSV converter

Convert a JSON array to CSV, or a CSV file back to JSON, with nested objects flattened to dot-notation columns.

An array of objects. Nested objects are flattened with a dot, for example address.city.

 

CSV output

Editable. Paste your own CSV here and convert it back to JSON.

 

How it works

This tool is a bidirectional browser converter between JSON arrays and CSV, using the keys of the first object as column headers, flattening one level of nested objects with dot notation, and quoting CSV fields per RFC 4180, including fields that contain commas or line breaks.

  1. Paste JSON

    An array of objects, for example from an API response.

  2. Convert to CSV

    Column headers come from the union of every object's keys.

  3. Copy or download

    Or edit the CSV and convert it back to JSON.

What the converter does with nested data

Converting JSON to CSV is not always one to one: CSV is a flat table of rows and columns, while JSON can nest objects and arrays freely. This tool makes the same choices consistently in both directions:

  • Nested objects: flattened one level with a dot, so {"address":{"city":"Seoul"}} becomes a column named address.city.
  • Arrays inside an object: written into the cell as a JSON string, since a CSV cell cannot hold a list.
  • Missing keys: if one object in the array lacks a key that others have, its cell is left empty rather than causing an error.
  • Quoting: any field containing a comma, a quote, or a line break is wrapped in double quotes with internal quotes doubled, per RFC 4180, so multi-line addresses or notes round-trip correctly.

Everything runs in your browser

Both directions of the conversion run in JavaScript on this page. Your JSON or CSV, including customer records or internal exports, is never uploaded anywhere.

Frequently asked questions

How do I convert a JSON array to CSV format online?

Paste a JSON array of objects into the JSON input area and click Convert to CSV. The tool uses the keys from every object as column headers and writes each object as a CSV row. Nested objects are represented using dot notation, for example address.city becomes a header column. The CSV output appears in the lower text area and can be copied or downloaded.

Is my JSON or CSV data sent to a server when converting?

No. The conversion runs entirely in your browser using JavaScript. Your data never leaves your device, making this tool safe to use with customer records, internal data exports, or any sensitive dataset.

How do I convert a CSV file back to JSON using this tool?

Paste your CSV content, including a header row, into the CSV output text area and click Convert to JSON. The tool reads the first row as headers and produces an array of objects. Each following row becomes one object with key-value pairs. If headers use dot notation, the tool reconstructs nested objects accordingly. Fields quoted with embedded commas or line breaks are parsed correctly.

What happens to JSON fields with arrays or deeply nested objects during CSV conversion?

The converter flattens one level of object nesting using dot notation, but arrays within JSON objects are stringified as-is into the CSV cell value. Deep nesting beyond one level also serializes as a JSON string rather than flattening further. If your data has arrays or deep nesting, flatten the JSON manually before converting, or filter to only the columns you need.

What CSV delimiter does this converter use?

The tool uses a comma as the delimiter, consistent with the RFC 4180 CSV standard. If your data contains commas, quotes, or line breaks within values, those cells are automatically quoted. The tool does not currently support alternate delimiters like tab or semicolon, which are common in European locales. For TSV or semicolon-delimited files, pre-process the delimiter before pasting.