JSON to CSV converter

Turn a JSON array of objects into a clean, spreadsheet-ready CSV file. Everything runs in your browser — your data never leaves your device.

Input JSON

0 lines | 0 chars
Paste JSON, then validate or transform it.

Output

0 lines | 0 chars

Example

Input JSON
[
  { "id": 1, "name": "Ada", "role": "admin" },
  { "id": 2, "name": "Linus" }
]
CSV output
id,name,role
1,Ada,admin
2,Linus,

How to convert JSON to CSV

Four steps from raw JSON to a downloadable CSV file.

  1. Paste or load your JSON

    Paste a JSON array of objects into the Input panel, upload a .json file, or fetch one from a URL. Each object in the array becomes a row and each key becomes a column.

  2. Convert to CSV

    CSV is already selected in the Convert dropdown on this page. Click Convert to generate comma-separated output with a header row built from your object keys.

  3. Review the columns

    Columns are unioned across every object, so if some objects are missing a key those cells are simply left empty instead of shifting the row. The result appears in the Output panel.

  4. Copy or download the CSV

    Copy the CSV to your clipboard, or download it and open the file directly in Excel, Google Sheets, Numbers, or a pandas DataFrame.

JSON to CSV — questions

How the conversion handles real-world JSON.

What JSON shape converts best to CSV?

An array of flat objects, for example [{"id":1,"name":"Ada"},{"id":2,"name":"Linus"}]. The keys become the header row and each object becomes one data row. This maps directly onto a spreadsheet table.

How are nested objects and arrays handled?

CSV is a flat format, so any value that is itself an object or array is serialised back into a compact JSON string inside that cell rather than being expanded into more columns. If you need fully flattened columns, flatten the JSON before converting.

Are commas, quotes, and newlines escaped correctly?

Yes. Any cell containing a comma, double quote, or line break is wrapped in double quotes and embedded quotes are doubled, following the RFC 4180 convention that Excel and Google Sheets expect.

What if my objects don't all have the same keys?

The header row is the union of every key seen across all objects. Rows that lack a given key get an empty cell in that column, so columns stay aligned even with irregular data.

Can I convert a single JSON object instead of an array?

Yes, but a single object is emitted as two columns — key and value — with one row per property. To get a single data row with a column per field, wrap the object in an array: [ { ... } ].

Is my data uploaded to a server?

No. The conversion runs entirely in your browser with JavaScript. Nothing you paste, upload, or download is sent anywhere, which makes it safe for sensitive or proprietary data.