Convert · JSON to CSV

Convert JSON to CSV

Turn a JSON array of objects into clean CSV rows you can open in Excel, Google Sheets, or any spreadsheet — right in your browser.

No sign-up to start · Runs in your browser

JSON to CSV
Open your JSON in the editor
JSON
CSV

Runs entirely in your browser — nothing is uploaded.

[{"id":1,"name":"Ada Lovelace","email":"ada@example.com","active":true},{"id":2,"name":"Alan Turing","email":"alan@example.com","active":false}]
A JSON-to-CSV converter turns a JSON array of objects into rows and columns you can open in a spreadsheet. JSON Copilot reads each object as one row, builds the header from the union of every object’s keys in first-seen order, and writes the values as comma-separated cells. Missing keys leave a cell empty, and nested objects or arrays are kept as compact JSON text. Everything runs in your browser, so your data is never uploaded.

JSON to CSV example

JSON array of objects
[
  { "id": 1, "name": "Ada Lovelace", "roles": ["admin", "editor"], "active": true },
  { "id": 2, "name": "Alan Turing", "active": false, "team": { "name": "Crypto", "size": 4 } }
]
CSV output
id,name,roles,active,team
1,Ada Lovelace,"[""admin"",""editor""]",true,
2,Alan Turing,,false,"{""name"":""Crypto"",""size"":4}"

The header is the union of all keys in first-seen order: id, name, roles, active, team. Row 1 has no team and row 2 has no roles, so those cells are empty. The roles array and team object are written as compact JSON text, CSV-quoted with inner quotes doubled.

How to convert JSON to CSV

  1. 1

    Paste your JSON

    Drop a JSON array of objects into the input, or start from the loaded example.

  2. 2

    Let it read the shape

    Each object becomes a row, and the columns are collected from the union of every object’s keys, in the order they first appear.

  3. 3

    Get spreadsheet-ready CSV

    Values are written as comma-separated cells; commas, quotes, and newlines are safely quoted, and any nested object or array is serialized inline so no field is dropped.

  4. 4

    Copy or download the CSV

    Take the result straight into Excel, Google Sheets, or Numbers.

  5. 5

    Open your JSON in the editor

    Send the same JSON to the full editor to format, validate, and explore it as a tree or mind map with the AI copilot.

Why use this converter

Runs in your browser

Conversion is 100% client-side; your JSON never leaves your device and there’s no sign-up.

Union-of-keys columns

The header is the union of all object keys in first-seen order, so every field gets a column even if only some rows have it.

Empty cells for missing keys

When a row lacks a key, its cell is left blank instead of shifting the columns out of alignment.

Standard CSV escaping

Values containing commas, double quotes, or newlines are wrapped in quotes, with inner quotes doubled.

Nested values preserved

Objects and arrays are serialized as compact JSON inside the cell, so nothing is silently dropped.

Spreadsheet-ready output

The CSV opens cleanly in Excel, Google Sheets, and Numbers, and imports into most BI tools.

What JSON to CSV conversion actually does

CSV is a flat, two-dimensional format: one header row of column names, then one row per record. JSON is a tree. The conversion only makes sense when your JSON is a list of records with the same rough shape — a JSON array of objects — where each object maps naturally onto a row and each key onto a column. JSON Copilot takes that array, walks every object once to collect the column names, then emits one CSV line per object.

Concretely, an input like [{"id":1,"name":"Ada"},{"id":2,"name":"Alan"}] becomes a header of id,name followed by 1,Ada and 2,Alan. The column order follows the order keys first appear while scanning the array, not alphabetical order, so the CSV reads the way your objects are written. Numbers and booleans are written as-is (1, true), and strings are written literally, only getting quotes when they actually need them.

If you pass a single object instead of an array, it is treated as a one-row table. If you pass an array of plain values such as ["a","b","c"], there are no keys to become columns, so the output is a single column named value with one row per element. That keeps the tool predictable no matter exactly how your data is shaped.

Nested values and the union-of-keys columns

Real JSON is rarely perfectly rectangular. Two things make it messy: objects that do not all share the same keys, and values that are themselves objects or arrays. JSON Copilot handles the first with a union of keys — it scans every object in the array and records each distinct key the first time it sees it. The resulting header is the superset of all fields, so a key that appears in only one record still gets its own column, and records that lack it simply have an empty cell there.

The second problem — nested values — cannot be flattened without inventing a convention, so the converter keeps them intact as compact JSON. A value like ["admin","editor"] is written into its cell as the text ["admin","editor"], and {"name":"Crypto","size":4} becomes that same JSON string. Because those strings contain commas and quotes, the whole cell is wrapped in double quotes and the inner quotes are doubled, so a CSV parser on the other end still reads it as one field.

This is a deliberate trade-off: you get lossless output — nothing is dropped and no keys are silently merged — at the cost of cells that hold JSON rather than fully exploded columns. If you need each nested field in its own column, flatten the JSON first (the editor’s flatten tool turns nested keys into dotted paths) and then run the CSV conversion on the flat result.

Where JSON to CSV fits: spreadsheets, exports, and BI

The most common reason to convert JSON to CSV is to get data out of an API and into a spreadsheet. Excel, Google Sheets, and Numbers all import CSV natively, so a paginated API response or a saved JSON export can become a sortable, filterable table in seconds. Analysts who do not write code can then pivot, chart, and annotate the data without ever touching the original JSON.

CSV is also the lowest-common-denominator import format for business-intelligence and database tooling. Warehouse loaders, BI dashboards, and bulk-import screens almost always accept CSV even when they cannot parse arbitrary JSON. Converting first means you control exactly which columns exist and in what order, rather than relying on another system’s opinionated JSON flattening.

It is handy for one-off data work too: deduping a list, diffing two exports, sharing a subset of records with someone who lives in spreadsheets, or turning event JSON into rows you can quickly eyeball. Because the conversion is client-side, you can do all of this with data you would never want to paste into an online uploader.

Edge cases: mixed shapes, missing keys, and quoting

A few inputs behave in ways worth knowing. An empty array has no rows to write, and an array of objects that all have no keys has no columns, so both are reported as errors rather than producing a blank file. If your array mixes objects with non-objects — say an object and a bare string — the converter falls back to the single value column mode instead of guessing a header.

Missing keys never shift your columns. Because every row is written against the full union of keys, a record that omits a field gets an empty cell in that position, keeping the grid aligned. Null values are written as empty cells too, while false and 0 are written literally as false and 0 — they are real values, not blanks.

Quoting follows standard CSV rules so the file survives a round trip. Any cell containing a comma, a double quote, or a newline is wrapped in double quotes, and literal double quotes inside are escaped by doubling them. That is why nested JSON cells look like "{""name"":""Crypto""}" in the raw file yet import as a single clean field. When in doubt, run the result back through the CSV to JSON tool to confirm it parses the way you expect.

Frequently asked questions

Is the JSON to CSV converter free and private?

Yes. It runs entirely in your browser with no account and no upload, so your data stays on your device.

What JSON shape does it expect?

A JSON array of objects works best — each object is a row. A single object becomes one row, and an array of plain values (strings or numbers) becomes a single "value" column.

How are the columns chosen?

The header is the union of every object’s keys, kept in the order each key first appears. If row 1 has {id, name} and row 2 adds {email}, the columns are id, name, email.

What happens to nested objects and arrays?

They are written into the cell as compact JSON text (for example {"name":"Crypto"}) and CSV-quoted so the commas inside do not split the cell. No data is lost.

What if some objects are missing keys?

Missing values become empty cells. The columns stay aligned because every row is written against the full union of keys.

How is this different from CSV to JSON?

This tool goes JSON → CSV (objects to rows). The reverse tool reads the first CSV row as keys and coerces numbers and true/false back into JSON types. Use whichever direction your data is in.

Does it handle commas and quotes inside values?

Yes. Any value containing a comma, double quote, or newline is wrapped in double quotes, and literal quotes are escaped by doubling them, following standard CSV rules.

Where does my result go after converting?

The CSV stays here to copy or download. To keep working on the JSON itself — formatting, validating, or viewing it as a tree or mind map with the AI copilot — open it in the full editor.

Related tools

Convert your JSON to CSV

Open the Editor