JSON to CSV Converter

–paste JSON - RFC 4180 quoting handled for you
RuleWhat the tool does
Commas in valuesfield wrapped in quotes: "a, b" stays one cell
Quotes in valuesdoubled per RFC 4180: "he said ""hi"""
Nested objectsserialized as a JSON string inside the cell
Missing keysempty cell - columns come from the union of keys
The CSV this tool emits follows RFC 4180 exactly: fields containing commas, quotes or line breaks get quoted, embedded quotes get doubled, and CRLF separates rows - the three rules every spreadsheet agrees on and most hand-rolled converters get wrong on one. The download adds a UTF-8 BOM so Excel opens accented text correctly instead of mojibake. Bottom line: JSON key order is not CSV column order - the header comes from the union of every object’s keys in first-seen order, which is why the sample chips show stable schemas. Round-trip helpers: CSV to JSON, JSON formatter, file-type context MIME types table, transfer math download time calculator.

JSON arrays and CSV files are the two dialects of tabular data, and the translation fails on three specific rocks: commas inside values, embedded quotes, and Excel’s handling of UTF-8. This converter handles all three per RFC 4180 - the quoting spec every spreadsheet implements - and the download writes a UTF-8 BOM so Excel opens accented text as text, not mojibake.

Columns come from the union of every object’s keys in first-seen order, so ragged JSON (objects with missing fields) converts with empty cells rather than silently dropping data.

How to use

  1. Paste a JSON array of objects; the sample chips load city and inventory schemas to start.
  2. Copy CSV puts the exact output on your clipboard; Download .csv writes a BOM-prefixed file Excel opens double-click clean.
  3. Nested objects and arrays serialize as JSON strings inside their cell - flatten upstream if you need them split.

Frequently asked questions

Why does my CSV look wrong in Excel?

Three usual causes, all handled here: commas inside values need quoting (RFC 4180), unquoted accented text needs the UTF-8 BOM Excel uses to guess encoding, and embedded quotes must be doubled, not escaped with backslashes. Hand-rolled converters typically miss the second one.

What happens to nested objects and arrays?

They serialize as JSON strings inside their cell - {"a":1} becomes the text {"a":1}, quoted per RFC 4180. That preserves the data losslessly; if you need columns like a.b, flatten the JSON before converting.

What if my objects have different keys?

The header is the union of all keys in first-seen order; objects missing a key get an empty cell. Nothing is dropped silently - which is exactly what you want when merging API pages with optional fields.

Is the output RFC 4180 compliant?

Yes: CRLF row breaks, quote-wrapping for fields containing commas, quotes or line breaks, and doubled embedded quotes. RFC 4180 is the CSV dialect Excel, Sheets and every database loader agree on - which is why the spec, not convenience, decides the quoting.

Related tools