Skip to content
snip tools

JSON to CSV converter

Convert an array of JSON objects to CSV. Proper quoting, runs in your browser.

Runs 100% in your browser
 

How to convert JSON to CSV

  1. Paste your JSON array. Paste an array of objects — for example a list response copied from an API.
  2. Choose the delimiter. Comma by default; pick semicolon or tab for a locale or a TSV.
  3. Open it in a spreadsheet. Copy or download the CSV and open it in Excel, Google Sheets or a BI tool.

Turning a tree into a grid

JSON and CSV describe data differently. JSON is a tree — nested, and each object can carry its own set of keys. CSV is a flat rectangle — every row has the same columns. Converting between them is really a projection: the tool scans every object, collects the union of all keys to form the header, and then writes one row per object, filling a column when the key is present and leaving it blank when it isn't. That's why heterogeneous data (objects with slightly different fields) still produces a clean, aligned table.

What happens to nested data

A cell can only hold a single value, so a field whose value is itself an object or an array has nowhere to go in a flat grid. Rather than drop it, the converter writes it back as a compact JSON string inside the cell — lossless, but not split into separate columns. If you need address.city and address.zip as their own columns, flatten the structure before converting; if you just need the data to survive the trip, the JSON-in-a-cell approach keeps everything.

Safe output, and the round trip

Every value is quoted per RFC 4180 when it contains the delimiter, a quote or a newline, so the file imports cleanly instead of splitting a value across columns. To go the other way — parse a CSV export back into objects — use the CSV to JSON converter, and the JSON formatter is handy for checking the source array is valid before you convert it.

Frequently asked questions

What JSON shape does it expect?
An array of objects — the typical shape of an API list endpoint. Each object becomes a row, and the header row is the union of every key seen across all the objects, so the grid has one column per distinct field.
My objects have different keys — what happens?
That's fine and common. Because the header is the union of all keys, an object missing a particular field just gets an empty cell in that column. Every row ends up with the same columns in the same order.
How are nested objects and arrays handled?
A CSV cell holds one value, but a nested object or array isn't one value — so it's serialised back to a JSON string inside the cell. Nothing is lost, but those nested fields aren't split into their own columns. If you need that, flatten the JSON first (e.g. lift address.city to a top-level key) before converting.
Are commas, quotes and newlines in a value safe?
Yes — the output follows RFC 4180. Any value containing the delimiter, a double quote or a line break is wrapped in double quotes and internal quotes are doubled (""), so the file opens correctly in any spreadsheet instead of shifting columns.
Which delimiter should I use?
Comma is the default. Pick semicolon for European locales (where the comma is the decimal mark) or tab to produce a TSV. Match whatever the tool you're importing into expects.
Is anything uploaded?
No — the conversion runs entirely in your browser, so an export full of customer or order data never leaves your device.