Skip to content

JSON ↔ CSV Converter

Turn an array of JSON objects into a spreadsheet-ready CSV and back, handling quoted fields and embedded commas properly.

Input

Output

The parts people get wrong by hand

  • A field containing the delimiter must be quoted — "Smith, John" is one field, not two.
  • A quote inside a quoted field is doubled: "said ""hi""".
  • Records missing a key still need a column, or every row after it shifts. The union of all keys is used as the header.
  • A newline inside a quoted field is part of the value, not the end of the row.

Splitting on commas with a regular expression breaks on all four. This uses a real RFC 4180 parser.

Frequently asked questions

Why are my numbers strings after converting from CSV?

CSV has no types — everything in it is text. Inferring numbers would silently corrupt values like a zip code of 01234 or a long id, so the conversion keeps them as written.

Can it handle nested JSON?

Nested objects and arrays are serialized into their cell as JSON, since CSV has no way to express nesting. Flatten first if you need columns per field.

Which delimiter should I use for Excel?

Comma in most locales, but semicolon where the comma is the decimal separator (much of Europe). Both are offered.

Related tools