jfmt.dev

JSON to CSV

Paste an array of objects and copy comma-separated rows for Excel, Sheets, or pandas. Conversion stays in this tab. Nested objects are stringified into cells unless you flatten them first or you want a real .xlsx from JSON to Excel.

input.json

JSON formatter

Input0 B
Output ยท preview.json
{ }

Run a tool to see a polished result here

Live syncReady ยท processed locally in your browser
Local-only processing: your JSON never leaves this browser tab.

How this converter builds rows

Each object in an array becomes one CSV row. The union of keys becomes the header line. A single object is one row. Primitive arrays become one column of values if you wrap them as objects; a raw array of numbers is not a table. Nested objects and nested arrays are JSON-stringified into a single cell โ€” that is the important difference from JSON to Excelโ€™s flatten mode.

How nested arrays flatten (they do not, on this page)

A value like `"tags": ["json","csv"]` becomes one CSV cell containing the JSON array, quoted so the inner commas do not create extra columns. A value like `"address": {"city":"London"}` becomes one cell containing `{"city":"London"}`. If you need tags.0 / tags.1 or address.city as headers, switch to JSON to Excel with flatten, or pre-process the JSON so those fields are already top-level.

[ { "name": "Ada", "tags": ["json", "csv"] } ]
โ†’ name,tags
  Ada,"[""json"",""csv""]"

Mixed keys, nulls, and booleans

Row 1 has `role`, row 2 does not: the header still includes role, row 2 leaves it empty. `null` becomes an empty cell, not the text null. Booleans become `true`/`false` text. Numbers stay unquoted. Strings that contain commas, quotes, or line breaks are RFC 4180-quoted.

Excel-specific CSV pitfalls

Excel may split UTF-8 CSV on the wrong delimiter if a BOM is missing; this converter emits UTF-8 without a BOM. Cells that look like `=SUM(A1)` are still CSV text โ€” Excel may treat them as formulas when opened. For typed cells and no formula injection, download .xlsx from JSON to Excel instead. Very wide objects create very wide CSV; that is still one header line.

Sample input on this page

The sample is two people with nested address objects and tag arrays. CSV mode will put `{"city":"London"}` into an address cell and `["json","csv"]` into a tags cell. That is expected: this converter does not explode nested keys. Compare with the same sample on JSON to Excel using flatten.

[
  { "name": "Ada", "role": "engineer", "address": { "city": "London" }, "tags": ["json", "csv"] },
  { "name": "Linus", "role": "maintainer", "address": { "city": "Helsinki" }, "tags": ["kernel"] }
]

How to use this tool

  1. Paste an array of similar objects. Mixed keys are fine; missing keys become empty cells.
  2. Run JSON to CSV. Headers are emitted in first-seen order. Nested values appear as JSON text inside quoted cells.
  3. Copy the CSV, or download it from the editor chrome as a .csv file.
  4. If you needed address.city as its own column, either flatten the JSON yourself or use JSON to Excelโ€™s flatten mode, which builds those columns and a real workbook.

When this page is the right choice

Use JSON to CSV when the output must be portable text: git diffs, pandas.read_csv, database imports. Use JSON to Excel when someone needs to double-click a .xlsx. Do not use this page to convert XML or YAML โ€” those have their own URLs.

FAQ

Must the JSON be an array?

An array of objects becomes one CSV row per object. A single object becomes one row.

Are nested objects flattened into extra columns?

Not on this page. Nested values are stringified into cells. Use JSON to Excel flatten mode for dotted columns.

Will Excel open this CSV as UTF-8?

Usually. There is no BOM. If glyphs break, import the file as UTF-8 or use the .xlsx downloader instead.

How are commas inside strings handled?

Fields that contain commas, quotes, or newlines are wrapped in double quotes; inner quotes are doubled.

Is the file uploaded?

No. Conversion stays in this tab.