English

JSON to CSV Converter — Arrays to CSV

Convert a JSON array of objects to CSV (flattening, delimiters, Excel BOM)

Runs in your browser · nothing is uploaded

CSV result

What it is

JSON arrays are everywhere in development, but spreadsheets work better with CSV. This tool converts JSON shaped like [{...}, {...}] into CSV with a header row. It updates as you edit the input, and you can also download the result as a file.

How to use

  1. Paste an array of objects into the input. A single object gives you a one-row table.
  2. Pick a delimiter: comma, semicolon, tab or pipe. Some regional Excel installs expect semicolons.
  3. If you will open the file in Excel, leave UTF-8 BOM on and press Download CSV.
  4. To paste into another program, use the Copy button instead.

How it works

  • The format follows RFC 4180. A value containing the delimiter, a double quote or a line break is wrapped in double quotes and inner quotes are doubled. Lines end with CRLF.

  • The first row is the header. Columns are collected across all rows, in the order each key first appears.

  • Nested objects are flattened with dot notation (a.b.c). Arrays and empty objects go into one cell as a JSON string such as ["a","b"]. If a key itself contains a dot, it cannot be told apart when you convert back.

  • null becomes an empty cell, booleans are true or false, and numbers use JavaScript’s own notation. Integers beyond 9007199254740991 are rounded when the JSON is read, so a warning is shown.

  • Array items that are not objects (numbers, strings and so on) produce a single column named value.

  • Files are UTF-8, and the BOM is added only to the downloaded file.

  • Round-trip caveats: null becomes an empty cell, so it cannot be told apart from an empty string in CSV. CSV also has no types, so converting back with type conversion turns numeric strings such as "123" into the number 123.

  • Excel formula injection: a cell that starts with =, +, - or @ can be executed as a formula when the file is opened in Excel. For data from untrusted sources, turn on the option that puts ’ before such values: the cell then shows as text (opened from a CSV, the apostrophe stays visible in the cell), while plain negative numbers such as -12.5 stay numbers. It is off by default, so your values are not rewritten unless you ask.

Examples

Input:

[{"name":"홍길동","address":{"city":"Seoul"},"tags":["a","b"]},{"name":"Bob"}]

Result:

name,address.city,tags
홍길동,Seoul,"[""a"",""b""]"
Bob,,

FAQ

Excel shows garbled characters when I open the CSV. What can I do?

Excel often reads a UTF-8 CSV without a BOM as a legacy code page, which garbles Korean, Chinese and accented text. Keep Add UTF-8 BOM on and use Download CSV, and the file starts with the BOM bytes EF BB BF so Excel reads it as UTF-8. The Copy button leaves the BOM out.

How is nested JSON turned into a table?

An object inside an object becomes a column named with dots, such as address.city. An array goes into a single cell as a JSON string. If rows have different keys, the columns are merged in the order they first appear and missing cells stay empty.

Can I turn the CSV back into JSON?

Use the CSV to JSON converter with number conversion and nesting restore turned on and you get back something very close to the original. CSV carries no type information, though, so the string "123" and the number 123 look the same.

Is my data uploaded?

No. The conversion runs entirely in your browser and nothing is sent or stored.

Missing a tool?