PlayTools

JSON to CSV Converter

Convert a JSON array of objects to CSV with a choice of delimiter and an optional header row. Handles missing keys and nested values.

Runs in your browser — nothing you enter is uploaded

The column list is the union of keys across all objects, so rows with missing keys get empty cells. Nested objects and arrays are written as compact JSON inside the cell. Values containing the delimiter, a quote or a line break are wrapped in double quotes with quotes doubled, per RFC 4180. Everything runs in your browser.

Advertisement

From a JSON array of objects to a CSV table

JSON and CSV solve different problems. JSON is hierarchical and typed; CSV is a flat grid of text that spreadsheets, databases and BI tools ingest directly. Converting JSON to CSV means picking a set of columns and writing one row per record. This tool takes an array of objects — the shape most APIs return for a list — and produces that table.

Columns are the union of every key across all objects, in the order they first appear. Records that are missing a key get an empty cell, so uneven data still produces a rectangular table with nothing dropped. If you need a fixed or reordered column set, arrange the keys in your source data first.

Nested values are the awkward case. CSV has no concept of a sub-table, so a value that is itself an object or array is serialised as compact JSON inside its cell. That preserves the information without inventing columns; if you would rather have dot-path columns like address.city, flatten the JSON before converting.

Output quoting follows RFC 4180: a field is wrapped in double quotes only when it contains the delimiter, a double quote or a line break, and embedded quotes are doubled. You can switch the delimiter to semicolon (common where the comma is a decimal separator), tab, or pipe. Copy the result or download it as a .csv file — both happen in the browser, with no upload.

The whole conversion runs client-side, so it works offline and your data never leaves the page.

Key formulas (reference)

columns = ordered union of Object.keys(row) for every row
cell(value):
  object/array → JSON.stringify(value)
  null/undefined → ""
  else → String(value)
quote a cell if it contains  delimiter | " | newline  → wrap in "…", double the quotes

These free tools pair well with this page — open them in a new tab to finish your workflow.

Advertisement

Frequently Asked Questions

What JSON shape does it expect?

An array of objects, where each object is one row and its keys are column names — for example [{"name":"Ada","role":"Engineer"}]. A single object is also accepted and produces one data row.

What happens when objects have different keys?

The column list is the union of every key seen across all objects, kept in first-seen order. Rows that lack a given key get an empty cell for that column, so no data is lost and the table stays rectangular.

How are nested objects and arrays handled?

A value that is itself an object or array is written into the cell as compact JSON (e.g. {"lat":1,"lng":2}). CSV has no native concept of nesting, so this keeps the information without inventing extra columns. Flatten your data first if you need nested fields as separate columns.

How does quoting work?

Per RFC 4180: a value is wrapped in double quotes only if it contains the delimiter, a double quote, or a line break, and any double quotes inside are doubled. Plain values are left unquoted so the output stays readable.

Can I change the delimiter?

Yes — comma, semicolon, tab or pipe. Semicolon is common in locales where the comma is the decimal separator; tab-separated output opens cleanly in spreadsheet software.

Can I get a file instead of copying?

Yes. "Download .csv" saves the output as data.csv using a blob created in your browser. Nothing is uploaded — the conversion and the download both happen locally.

Will Excel open the result correctly?

Generally yes for comma or tab output. If your data contains non-ASCII characters and Excel misreads them, choose tab delimiter or import via Data → From Text so you can set UTF-8 encoding.