Convert JSON to CSV

Paste a JSON array of objects — an API response, a database export, a log dump — and get a spreadsheet-ready CSV. Nested objects and arrays are flattened into dot-notation columns, the union of every key becomes the header row, and objects missing a field get an empty cell rather than a broken row.

✓ Runs in your browser — nothing uploaded Free, no sign-upNo watermark

How to use the JSON to CSV

  1. Paste a JSON array of objects, or an object wrapping one such as {"items": [...]}.
  2. Choose whether to flatten nested structures into dot-notation columns.
  3. Pick the delimiter your spreadsheet expects.
  4. Copy the CSV or download it and open it in Excel, Numbers or Google Sheets.

The shape mismatch

JSON is a tree; CSV is a rectangle. Converting means deciding how nesting becomes columns, and the two sensible answers are both here. Flattening walks the whole structure and gives each leaf value a column named by its path, so {"user":{"name":"Ada"},"tags":["a","b"]} yields the columns user.name, tags[0] and tags[1]. Not flattening keeps one column per top-level key and writes any nested value as a JSON string in the cell, which is better when you plan to read the file back into code.

Ragged data

API responses rarely have the same keys on every record. The header is built from the union of every key seen, in first-appearance order, and any record missing a field gets an empty cell. That keeps the file rectangular and importable. The summary under the output tells you how many records were incomplete, which is a quick way to spot an optional field you did not know about.

Quoting and Excel's habits

Fields containing the delimiter, a double quote or a newline are quoted automatically and internal quotes are doubled, per RFC 4180. Turn on "quote every field" when the consumer is fussy or when you want to stop Excel reinterpreting values. That reinterpretation is worth planning for: Excel converts 007 to 7, reads 1-2 and 3/4 as dates, and truncates numbers longer than 15 digits. There is no way to prevent this from inside a plain CSV file — import it with Data → From Text/CSV and set the problem columns to Text instead of double-clicking the file.

SettingChoose when
Comma delimiterDefault; UK/US locales, most APIs
Semicolon delimiterExcel in a locale where the comma is a decimal point
Tab delimiterPasting straight into a spreadsheet, or data full of commas
CRLF line endingsConsumer is an older Windows tool

Encoding and accents

The downloaded file is UTF-8. Excel on Windows assumes the system code page when a CSV is opened by double-clicking, which is why names such as "Müller" can appear as "Müller"; importing through the Data tab and choosing UTF-8 fixes it. Google Sheets and Numbers detect UTF-8 correctly.

What gets lost

CSV has no types, no null, and no nesting. null and an empty string both become an empty cell, booleans become the text true/false, and deeply nested arrays can produce an unwieldy number of columns. If the data is going back into a program rather than a spreadsheet, keep it as JSON.

Frequently asked questions

What input does it expect?

An array of objects, or a single object wrapping one, such as {"data": [...]}. A lone object is written as a one-row file.

How are nested objects handled?

With flattening on, each leaf gets a dot-notation column such as address.city. With it off, nested values are written as JSON text inside the cell.

Why does Excel mangle my IDs and dates?

Excel auto-converts values when a CSV is opened directly. Use Data → From Text/CSV and set those columns to Text.

Do records need identical keys?

No. The header is the union of all keys and missing values become empty cells, so ragged data still imports cleanly.

Privacy

This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.

Last updated 2026-09-23.