JSON to CSV Converter

Turn a JSON array into a spreadsheet-ready CSV.

Developer Tools Free, no sign-up Runs in your browser

JSON to CSV Converter tool

Flattening turns {"a":{"b":1}} into a column named a.b.

A BOM makes Excel read accented characters correctly.

0
Rows
0
Columns
0 B
CSV size

About the JSON to CSV Converter

JSON to CSV Converter takes an array of objects and produces a CSV you can open in Excel, Google Sheets or Numbers. It is the step between an API response and somebody who wants to look at the data in a spreadsheet.

Two things make this conversion harder than it looks, and both are handled here. The first is that JSON objects need not all have the same keys: one record has a middle name, the next does not. The columns are built from the union of every key seen, so nothing is silently dropped and missing values become empty cells rather than shifting the row.

The second is nesting. CSV is flat and JSON is not, so an object inside an object has to go somewhere. Nested fields are flattened into dotted column names, so a user object containing an address containing a city becomes a column called user.address.city. Arrays are either expanded into numbered columns or joined into one cell, whichever you choose.

Quoting is handled properly throughout. A field containing a comma, a quote mark or a line break is wrapped and escaped the way the CSV convention requires, so the file opens correctly instead of exploding into the wrong number of columns.

Everything runs inside your browser. Nothing you paste is uploaded, logged or stored, which matters when the input is a client list, an internal URL map or anything else you would not post publicly.

How to use the JSON to CSV Converter

  1. Paste your JSONAn array of objects is the normal case; a single object works too.
  2. Choose how nesting is handledFlatten into dotted columns, or keep nested values as JSON text.
  3. Pick a delimiterComma, semicolon or tab, depending on what your spreadsheet expects.
  4. Copy or download the CSVDownload gives you a file ready to open in a spreadsheet.

Features

  • Builds columns from every key across every record
  • Flattens nested objects into dotted column names
  • Arrays expanded into numbered columns or joined into one cell
  • Correct quoting for commas, quotes and line breaks
  • Comma, semicolon or tab output
  • Clear parse errors that point at the problem
  • Runs entirely in your browser

Who uses this tool

The json to csv converter is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Getting an API response into a spreadsheet
  • Handing data to somebody who does not read JSON
  • Preparing a data export for a bulk import form
  • Checking a JSON file by eye in a familiar layout
  • Producing a quick report from a log file

Frequently asked questions

What shape of JSON does this expect?

An array of objects, which is what an API list endpoint usually returns. A single object produces a one-row CSV. An array of plain values produces a single column.

What happens to nested objects?

They are flattened into dotted column names, so address.city becomes its own column. You can switch that off and keep the nested value as JSON text in one cell instead.

What if records have different keys?

Columns are built from the union of all keys, so no field is lost. Records missing a key get an empty cell in that column rather than a shifted row.

Why does Excel split my data wrongly?

Usually a delimiter mismatch: many European Excel installations expect semicolons. Switch the output delimiter to semicolon and it will open correctly.

Are commas inside values handled?

Yes. Any field containing a comma, a quote or a line break is quoted and escaped the way the CSV convention requires.

Is my data uploaded?

No. The conversion runs in your browser, which is why it is safe to paste production data into it.

If the json to csv converter is not quite what you need, these other free tools solve closely related problems.

CSV to JSON Converter

Turn spreadsheet data into JSON, or JSON records back into CSV rows.

Developer Tools Use tool

JSON Formatter

Pretty-print and validate JSON, with the exact line and column of any error.

Developer Tools Use tool

CSV Viewer

View CSV data as a proper table you can sort, search and page through.

Developer Tools Use tool

CSV Formatter

Fix delimiters, trim fields, remove empty rows and re-quote CSV properly.

Developer Tools Use tool

JSON to XML Converter

Turn JSON into indented, well-formed XML with proper escaping.

Developer Tools Use tool