Developer Tools

JSON to CSV Converter

This tool turns JSON into a spreadsheet-ready CSV. Two things decide whether the result is usable: nested objects have to become columns somehow, since CSV is flat, and any value containing a comma, a quote or a line break has to be quoted correctly or the file falls apart when opened. Both are handled here rather than left to chance.

Runs entirely in your browser — nothing you paste is uploaded.

Delimiter

The standard, and what most tools expect.

How to

How to use the JSON to CSV

  1. 1

    Paste your JSON

    An array of objects is the usual input. A wrapper such as {"data": [...]} is unwrapped automatically, since that is how most APIs respond.

  2. 2

    Choose how to flatten

    Nested objects become dotted columns like user.address.city. Set the maximum depth if you want deep structures left as JSON in a single cell.

  3. 3

    Pick a delimiter

    Comma is standard. Semicolon is what Excel expects in many European locales, where a comma is the decimal separator.

  4. 4

    Copy or download

    Download the .csv to open in a spreadsheet, or copy it to the clipboard as tab-separated text for pasting directly into a sheet.

Examples

JSON to CSV examples

A value containing a comma

Input
[{"name":"Ada, Lovelace"}]
Output
name "Ada, Lovelace"

Without quoting, that single value would be read as two columns and every row after it would be misaligned. Quoting is applied wherever the value needs it.

Nested objects

Input
[{"user":{"name":"x"}}]
Output
user.name x

CSV has no way to express nesting, so the path becomes the column name. The dotted convention is what most spreadsheet users expect.

Records with different keys

Input
[{"a":1},{"b":2}]
Output
a,b 1, ,2

The columns are the union of every key found, with blanks where a record lacked one. Using only the first record's keys would silently discard data.

Why use it

What the JSON to CSV gives you

Quoting handled properly

Commas, quotes and embedded newlines are escaped according to the CSV convention, so the file opens correctly in Excel, Sheets and Numbers.

No data quietly lost

Columns are the union of all keys across all records, so a field that only some records have still appears.

Predictable column names

Nested paths become dotted names rather than being dropped or exploded into extra rows.

Runs in your browser

Exports are usually real data. Nothing is uploaded and no copy is retained.

Good to know

JSON to CSV limitations

  • Arrays of objects inside a record are serialised as JSON in a single cell, since exploding them would change the row count.
  • CSV has no types, so everything becomes text — a spreadsheet will reinterpret it on opening, sometimes wrongly.
  • Very deep nesting produces long column names, which is why the depth limit exists.
  • Excel may still mangle values that look like dates or long numbers, which is a spreadsheet behaviour no exporter can prevent.

Summary

JSON to CSV in short

  • Values containing commas, quotes or newlines are quoted correctly.
  • Nested objects flatten to dotted column names.
  • Columns are the union of all keys, so nothing is silently dropped.
  • Choose a semicolon delimiter if Excel in your locale expects one.
  • Everything runs in your browser.

FAQ

JSON to CSV questions

How are commas inside values handled?

The value is wrapped in quotes, and any quote inside it is doubled. That is the convention every spreadsheet follows, and getting it wrong is what causes a file to open with its columns shifted from one row onwards.

What happens to nested objects?

They become dotted column names, so {"user":{"city":"x"}} produces a user.city column. CSV is a flat format with no way to express nesting, so a path-based name is the closest faithful representation.

How are arrays inside a record handled?

An array of simple values is joined into one cell. An array of objects is written as JSON in the cell, because expanding it would multiply the rows and silently duplicate the rest of the record.

What if my records do not all have the same fields?

Every key found anywhere becomes a column, and records lacking it get an empty cell. Taking the columns from the first record alone — which several converters do — would quietly discard fields that appear later.

Why does Excel put everything in one column?

Because your Excel is configured for a locale where the list separator is a semicolon rather than a comma. Switch the delimiter to semicolon and the file will open correctly.

Does it handle an API response wrapper?

Yes. A response shaped like {"data": [...]} or {"results": [...]} is unwrapped automatically, since pasting a raw API response is the most common way this tool gets used.

Are numbers and booleans preserved?

They are written in their plain form, but CSV has no type system, so it is the spreadsheet that decides how to read them. This is why an id with leading zeros can lose them on opening — a spreadsheet behaviour, not an export bug.

How much data can it convert?

Tens of thousands of rows convert without difficulty. Beyond that both the input and the output are held in memory, so a very large export may become slow.

Is my JSON uploaded to convert it?

No. Conversion runs in this page. That matters because the JSON people convert to CSV is nearly always a real export — customers, orders, transactions.

Discover

Related developer tools