JSON to CSV

Turn a JSON array of objects into a CSV your spreadsheet will open cleanly. The header row is built from the union of every record's keys rather than just the first one's, so a field that only appears halfway through the array still gets a column — taking the first object's keys is the usual shortcut and it drops data without any warning. Cells are quoted only where the rules require it, and quotes inside a cell are doubled correctly, so values containing commas, quotes or line breaks survive a round trip. Nested objects can be flattened into dot-separated columns or kept as JSON in a single cell, and there is a UTF-8 BOM option so Excel stops mangling accented characters. Drop a folder of JSON files and get the whole set back as a ZIP. It all runs in your browser, so API responses and exports stay on your machine.

How each value type becomes a cell

JSON valueCSV cellNote
"plain"plainNo quoting needed
"x,y""x,y"Quoted — contains the delimiter
"say \"hi\"""say ""hi"""Inner quotes doubled
null(empty)Null and undefined both blank
{"b":1} flattenedcolumn a.bBecomes its own column
["x","y"]"[""x"",""y""]"Primitive array kept in one cell

When to use it

  1. Turn an API response into a spreadsheet a colleague can open.
  2. Export JSON records for import into a CRM or billing system.
  3. Flatten nested JSON into columns for analysis in Excel or Sheets.
  4. Convert a folder of JSON exports in one pass.
  5. Produce a CSV with the right quoting for a strict downstream importer.

How to Use

  1. Paste a JSON array of objects, or drop one or more .json files.
  2. Choose a delimiter, and turn on flattening if your data is nested.
  3. Enable the BOM if the file is destined for Excel.
  4. Copy the CSV, download it, or download a whole batch as a ZIP.

Features

  1. Header built from the union of all keys, not just the first record's
  2. RFC 4180 quoting — only where needed, quotes doubled correctly
  3. Nested objects flattened to dot keys, or kept as JSON in one cell
  4. Comma, semicolon, tab and pipe delimiters
  5. Optional UTF-8 BOM so Excel reads accents properly
  6. Bulk files and folders with a ZIP download
  7. 100% client-side — API responses stay on your machine

FAQs

What if my objects have different keys?

The header is the union of all keys across every object, in the order they first appear, and a record missing a field gets an empty cell. Converters that use only the first object's keys quietly drop every later field — and worse, if they emit values positionally, the columns shift and the data ends up under the wrong headings.

How are nested objects handled?

Two ways, your choice. Flattening turns {"a":{"b":1}} into a column called a.b, which is what you want for analysis. Without flattening, the nested value is JSON-stringified into a single cell, which is better when you need to preserve the structure. An array of simple values is always kept in one cell rather than being spread across a.0, a.1 and so on.

Why is my CSV mangled when I open it in Excel?

Usually because Excel guessed a legacy encoding instead of UTF-8, which turns accented characters into mojibake. Switch on the BOM option: it prefixes a byte order mark that tells Excel the file is UTF-8. It is invisible in every other tool.

When does a value get quoted?

Only when it needs to be — if it contains the delimiter, a double quote, or a line break. Quotes inside a quoted value are doubled, as RFC 4180 specifies. Quoting everything would also be valid but makes the file harder to read and larger.

What line endings does it use?

CRLF, which is what the CSV specification calls for and what Excel expects. Almost every other tool accepts it too, so it is the safe default.

Is my data uploaded?

No. Conversion happens in your browser and files are read locally. API responses and exports pasted here are never sent to a server, logged, or stored.

Technical Details

The header row is the union of every object's keys in first-seen order, not just the keys of the first record. Taking the first object's keys is the common shortcut and it silently drops any field that only appears later in the array; building the union means a record missing a field produces an empty cell instead of shifting every subsequent column one place left. Each cell is quoted only when it has to be — when it contains the active delimiter, a double quote, a carriage return or a line feed — and quotes inside a quoted cell are doubled, per RFC 4180. Nested objects can either be flattened to dot-separated keys, so {a:{b:1}} becomes a column named a.b, or JSON-stringified into a single cell; an array of primitives is kept as one cell rather than exploded into a.0, a.1, a.2, which is almost never what you want in a spreadsheet. Rows are joined with CRLF, the line ending the CSV specification calls for and the one Excel expects. An optional UTF-8 byte order mark can be prefixed so Excel opens the file as UTF-8 rather than guessing a legacy code page and mangling every accented character.

Data & CSV Tools

Data & CSV Tools

  • YAML to JSON
  • CSV Graph Plotter
  • YAML Formatter & Validator
  • XML to JSON
  • Query String to JSON
  • Config to JSON
  • CSV Manipulator
  • Table Format Converter