JSON to CSV Converter

Convert JSON objects and arrays to CSV format instantly. Nested objects are flattened automatically.

Input JSON — object or array of objects
?

Quick answer

A JSON-to-CSV converter turns a JSON array of objects into spreadsheet rows: each object becomes a row, and the union of every object's keys becomes the column headers. This tool flattens nested objects into dotted columns, joins arrays into a single cell, and quotes any value containing a comma — entirely in your browser, so your data is never uploaded. Paste JSON, click Convert to CSV, then copy or download the result.

How This Tool Converts JSON to CSV

When to Use JSON to CSV

Worked example

Here is a realistic array that exposes the three things people most often get wrong — nested objects, arrays inside a record, and objects that don't all share the same keys:

Input JSON

[
  {
    "id": 1,
    "name": "Alice",
    "address": { "city": "Boston", "zip": "02101" },
    "roles": ["admin", "editor"]
  },
  {
    "id": 2,
    "name": "Bob, Jr.",
    "address": { "city": "Denver" }
  }
]

Output CSV

id,name,address.city,address.zip,roles
1,Alice,Boston,02101,admin | editor
2,"Bob, Jr.",Denver,,

What happened, line by line

Edge cases & gotchas

Frequently Asked Questions

What JSON format does this tool accept?

This tool accepts a JSON array of objects or a single JSON object. Each array item becomes one CSV row. Nested objects are flattened automatically using dot notation.

Can I convert nested JSON?

Yes. Nested objects are flattened automatically using dot notation — address.city, address.country, etc. Array values inside objects are joined with | .

Why is my CSV missing fields?

CSV rows are built from object keys. If some objects have different keys, missing values will appear as empty cells.

What delimiter does the CSV output use?

A comma by default, and you can switch to semicolon, tab or pipe, or type a custom character. Quoting follows whichever delimiter you pick, so a value containing that character is automatically wrapped in double quotes. Semicolon output is worth knowing about: Excel in many European locales expects ; as the list separator and will drop a comma-delimited file into a single column.

What happens to null or missing values in JSON?

JSON null values become empty cells in the CSV. If an object is missing a key that other objects in the array have, that cell is also left empty.

Why does Excel show my accented characters or emoji as garbled text?

Tick UTF-8 BOM (Excel) and the problem goes away. The file is written as UTF-8, but Excel on Windows assumes the legacy ANSI codepage when you double-click a .csv, so accents and emoji appear as mojibake. A byte order mark at the start of the file tells Excel it is UTF-8. The BOM is invisible in every other tool, and this converter strips it back off if you send the file through CSV to JSON. Importing via Data → From Text/CSV and choosing UTF-8 also works.

How are arrays of objects handled?

You choose. Join into one cell collapses ["admin","editor"] to admin | editor with a separator you control, and serializes objects to JSON. Indexed columns gives each element its own column — items.0.sku, items.1.sku — which keeps the data queryable. One row per element repeats the parent's scalar fields and emits one row per array item, the shape most databases and pivot tables expect.

Can I choose which columns end up in the CSV?

Yes. After converting, every detected column appears as a checkbox above the output. Untick the ones you do not need — deeply nested keys often produce noisy columns — and the CSV and preview regenerate immediately. This is easier than editing the JSON to remove fields first.

Does it accept NDJSON or JSON Lines input?

Yes. If the input is not a single valid JSON document, each non-empty line is parsed as its own JSON object, which is the NDJSON / JSONL format produced by log pipelines, jq, BigQuery exports and Elasticsearch. No wrapping array is required.