Skip to contentSkip to the inputSkip to the result

JSON → CSV

Turn JSON records into a spreadsheet-friendly table.

Loading tool

Instructions

JSON → CSV

How to use

  1. Paste an array of record objects.
  2. Convert and download the CSV.

Supported input

  • An object such as {"data":[…]} gives its first list of records; any other single object is one row.
  • Nested values are serialized.
  • Spreadsheet formula prefixes are protected.

Input example

[{"name":"Ada","age":30}]

Result example

name,age followed by Ada,30

Troubleshooting

  • Check required inputs, numeric ranges and the selected conversion direction.

How it works

  • Turn JSON records into a spreadsheet-friendly table.

Turning JSON records into a spreadsheet without losing anything on the way

Who usually asks for the CSV

  • A colleague in finance or operations wants to filter an API response in Excel, not read JSON
  • An admin panel exports a JSON list and you want totals or a pivot table in Google Sheets
  • A system only offers CSV import, while the data you have is a JSON dump

Two records, step by step

Take [{"id":1,"name":"Kim, Minji","memo":"says \"hi\"","vip":true},{"id":2,"name":"Lee","city":"Busan","vip":null,"tags":["a","b"],"addr":{"zip":"04524","gu":"중구"}}]. The header lists every key in the order it first appears: id, name, memo, vip, city, tags, addr.

  1. 1Row one is 1,"Kim, Minji","says ""hi""",true,,, — the name with a comma is quoted, the quotes inside memo are doubled, and city, tags and addr, which this record lacks, are empty.
  2. 2Row two is 2,Lee,,,Busan,… — the null in vip is also an empty cell, so once in CSV a null and a missing key look exactly the same.
  3. 3The tags array goes into one cell as JSON text, "[""a"",""b""]". With the a.b option, addr becomes two columns, addr.zip (04524) and addr.gu (중구); arrays stay as text either way.
  4. 4Every row ends in CRLF (\r\n), the line ending RFC 4180 describes and the one Excel on Windows and most CSV importers expect.

Two places where numbers change

This conversion reads the JSON into JavaScript values before writing the table, so unlike the JSON formatter it does not keep number tokens as written. {"order":12345678901234567890,"n":1.10} comes out as 12345678901234567000 and 1.1. If long identifiers such as order or account numbers matter, have the source send them as strings.

The second place is Excel itself. Its number precision is 15 digits, so a 16-digit number opened as a number gets its last digits replaced by zeros, and values with leading zeros such as "00123" or the postcode "04524" are intact in the CSV but lose their zeros when the file is opened by double-clicking. Open such files with Excel’s From Text/CSV import and set those columns to Text.

Choosing the separator

  • Comma: the default, and what Google Sheets, English- and Korean-locale Excel and nearly every CSV library expect.
  • Semicolon: in locales that write decimals with a comma, such as Germany or France, Excel’s list separator is a semicolon, and a comma file opens with everything in column A. With semicolons, "Kim, Minji" no longer needs quotes.
  • Tab: handy when you copy the result and paste it straight into spreadsheet cells, and it cuts down on quoting when the data is full of commas.

The cost of the formula guard

OWASP warns that cells beginning with =, +, -, @, a tab or a carriage return can run as formulas when a spreadsheet opens the file, and suggests prefixing them with a single quote. The tool writes the text value "=1+2" as '=1+2. A JSON number such as -5 is left alone, because a number cannot be a formula and a prefix would stop Excel treating it as a number; the string "-5" does get the quote.

That apostrophe is a real character in the file. If the CSV is headed for a database import or another program rather than a spreadsheet, add a step that strips the leading quote from those columns, or the apostrophe is stored as part of the value.

Checked

Frequently asked questions

What happens to nested JSON?

By default nested objects and arrays go into one cell as JSON text. Choose Spread into a.b columns and {"a":{"b":1}} gives a column named a.b; arrays stay as text.

Will Korean text break when the CSV opens in Excel?

The saved file starts with a UTF-8 BOM so Excel reads it as UTF-8. You can use a tab or semicolon instead of a comma. Up to 10,000 rows and 200 columns.

Why do some values start with an apostrophe?

Values starting with =, +, -, @ or a tab could run as formulas in a spreadsheet, so an apostrophe is added to keep them as text. =SUM(A1) becomes '=SUM(A1), and -5 given as text becomes '-5; a JSON number such as -5 stays a plain -5.