csvkit.org
CSV (Comma-Separated Values) utilities, in the browser
Say hi →

JSON to CSV

updated 12 March 2026

json → csv
Drop a .json file, or
ready

JSON to CSV Converter

Convert a JSON array — or JSON Lines (NDJSON) — into a valid RFC 4180 CSV. Paste the JSON on the left, copy or download the CSV on the right. Useful for turning an API response into a spreadsheet, or loading structured data into a CSV-only consumer. Runs entirely in the browser: no upload, no account, no size cap beyond available memory.

Before you start

The tool expects one of these three shapes:

The objects don't need to share the same keys. The header row is the union of every key that appears anywhere in the input, in first-seen order. Missing fields become empty cells.

How to use it

  1. Paste JSON or drop a .json / .jsonl file into the left pane.
  2. Click Convert. The CSV appears on the right and the status bar reports the row count.
  3. Use Download .csv to save the result, or copy it from the right pane.

If the input parses as JSONL it's auto-detected — you don't need a toggle. The output is always UTF-8 CSV with CRLF line endings (what Excel expects) and standard RFC 4180 quoting (cells with commas, quotes, or newlines get double-quoted).

Example

Input:

[
  { "id": 1, "name": "Alice", "tags": ["ops", "lead"] },
  { "id": 2, "name": "Bob, Jr.", "address": { "city": "Paris" } }
]

Output:

id,name,tags,address
1,Alice,"[""ops"",""lead""]",
2,"Bob, Jr.",,"{""city"":""Paris""}"

Notice three things: "Bob, Jr." is quoted because it contains a comma; nested objects and arrays are preserved as stringified JSON inside one cell; and the tags / address columns only appear because one record had them — the other gets an empty cell.

Tips & common pitfalls

Troubleshooting

I get "Invalid JSON" or a parse error.

Paste the input into any JSON linter to find the offending line. Common causes: trailing commas, single quotes instead of double, stray undefined or Python-style True/None values.

My output has fewer columns than I expected.

The header row is the union of keys present in the objects. If a field exists only as null in every record, it still becomes a column. If a field is genuinely missing from every record, it won't — check the input shape.

The CSV opens in Excel with all data in column A.

That's Excel's regional-settings quirk: in some locales it expects semicolons, not commas. Either open via the Data tab as above, or save the output with a sep=, preamble if you regularly ship CSVs to Excel users.

Frequently asked questions

What if my objects have nested values?

Nested objects and arrays are JSON-stringified into a single cell. This is lossless — re-parse the cell back as JSON to get the original value — but not something Excel will understand. Flatten upstream if you need real columns.

Does this handle JSONL / NDJSON?

Yes. If the input isn't a bracketed JSON array, each non-empty line is parsed as a standalone JSON object. Mixed-shape records are OK; see the header-union behaviour above.

Does the CSV have a BOM?

No. Omitting the BOM is friendlier to every consumer except Excel on Windows. If you specifically need Excel to pick up UTF-8 automatically, either prepend  yourself or import via the Data tab.

Is my JSON sent to a server?

No. Parsing and conversion both happen in your browser. See the privacy policy for details on what the site does and doesn't do.