JSON to CSV Converter

Paste a JSON array of objects and get a clean CSV file with one column per field, ready for any spreadsheet.

Delimiter
Nested objects
Header row

🔒 Runs entirely in your browser. Nothing you enter is sent to a server.

APIs, databases and log files speak JSON, while spreadsheets, reporting tools and many business systems speak CSV. This converter turns a JSON array into a tidy CSV table, flattening nested objects into their own columns and taking care of the quoting rules that trip up hand-written conversions.

How to use the JSON to CSV converter

  1. Paste your JSON into the left box, or click Try an example.
  2. Choose a delimiter. Comma is standard, but semicolon suits Excel in many European locales, and tab is good for pasting into spreadsheets.
  3. Choose how to handle nested objects: flatten them into dotted columns, or keep them as JSON text.
  4. Include or leave out the header row.
  5. Copy the CSV or click Download to save data.csv.

How the conversion works

  1. Parse the JSON. If it isn’t valid, you get the parser’s error message.
  2. Normalise the input to a list of rows. An array is used as it is, a single object becomes one row, and plain values such as numbers go into a column called value.
  3. Flatten nested objects if selected: {"address":{"city":"London"}} becomes address.city = London.
  4. Collect the columns in the order they first appear across all rows, so a field that only exists in later rows still gets a column.
  5. Write each cell following RFC 4180. A field is wrapped in double quotes when it contains the delimiter, a quote, a line break or leading or trailing spaces, and any quote inside it is doubled.

Worked example

The example data has three people. Ada and Alan have tags arrays, and only Grace has an active field:

[
  {"id":1,"name":"Ada Lovelace","email":"ada@example.com",
   "address":{"city":"London","country":"UK"},"tags":["math","computing"]},
  ...
  {"id":3,"name":"Grace Hopper",...,"active":true}
]

The result, with flattening on:

id,name,email,address.city,address.country,tags,active
1,Ada Lovelace,ada@example.com,London,UK,"[""math"",""computing""]",
2,Alan Turing,alan@example.com,Wilmslow,UK,"[""logic""]",
3,Grace Hopper,grace@example.com,New York,US,,true
  • address was split into address.city and address.country.
  • The tags arrays contain quotes, so the cells are quoted and the inner quotes are doubled.
  • active appears only in the last object, so the other rows have an empty cell there.

Opening the CSV in a spreadsheet

  • Excel: use Data → From Text/CSV for full control over the delimiter and encoding. Double-clicking a CSV uses your system’s regional list separator.
  • Google Sheets: File → Import → Upload, and let it detect the separator automatically.
  • Numbers (Mac): open the file directly. It detects commas and tabs.

Tips and pitfalls

  • Leading zeros can vanish. Spreadsheets may turn 00123 into 123. Import the column as text to keep them.
  • Long numbers lose precision. Excel keeps only 15 significant digits, so IDs longer than that should be imported as text.
  • Dates are left as written. ISO dates such as 2026-10-28 are recognised by most spreadsheets automatically.
  • Very wide data is hard to read. Deeply nested JSON can create dozens of columns. Choose “Keep as JSON text” if you only need the top-level fields.
  • Round trips work. Use the CSV to JSON converter to turn the file back into JSON.

Frequently asked questions

What JSON structure does the converter expect?

An array of objects, where each object becomes a row and each key becomes a column. A single object becomes one row. If you paste an object that contains an array, such as {"items":[...]}, the first array inside it is used.

How are nested objects handled?

With "Flatten" selected, nested keys become dotted column names, so {"address":{"city":"London"}} becomes a column called address.city. With "Keep as JSON text", the nested object is written into one cell as JSON.

What happens to arrays inside an object?

Arrays such as tags are written into a single cell as JSON text, for example ["math","computing"]. Spreading arrays across rows or columns would change the shape of the data, so they are kept intact.

Why does Excel show my CSV in a single column?

Some regional versions of Excel expect a semicolon instead of a comma. Choose the Semicolon delimiter, or import the file through Data → From Text/CSV and pick the delimiter there.

Is my data uploaded?

No. The conversion runs entirely in your browser, so it is safe to use with private or sensitive data.

Last updated October 28, 2026 · By the ZTool team