Skip to content
JsonSucks
← Back to the formatter

Convert JSON to CSV

Paste, upload, or drop JSON on the left — the CSV conversion updates live on the right as you edit, with nested keys flattened into columns. Copy or download it, no separate convert step.

Actions▾

JSON to CSV, with nested data flattened automatically

CSV is a flat, row-and-column format — great for spreadsheets, but JSON routinely has nested objects and arrays that don't map to a single cell. This converter handles that by flattening nested keys into dotted column names (so{ "address": { "city": "..." } }becomes a column named address.city), then builds one CSV row per item if your JSON is an array of objects, or a single row if it's one object. The column list is the union of every key seen across all items, so rows with missing fields just get an empty cell rather than breaking the conversion.

The conversion is live — edit the JSON on the left and the CSV on the right updates as you type, with no separate "Convert" button. Once it looks right, copy it to the clipboard or download it as a .csv file directly from the preview panel.

Need a different output format instead? The same document also converts live toXML orYAML — just switch the "View" dropdown, no need to start over.

How does JSON to CSV handle nested objects and arrays?

Nested keys are flattened into dotted column names — a field like address.city becomes its own column — so the output is a normal flat CSV that opens correctly in Excel, Sheets, or any spreadsheet tool. A single JSON object converts to a one-row CSV; an array of objects converts to one row per item, with the column list built from every key across all items.

What if my JSON isn’t an array of objects?

A single top-level object still converts fine, becoming one CSV row. Deeply irregular shapes (arrays of arrays, mixed types) will still produce a CSV, but the column layout may look unusual since CSV itself has no concept of nested structure — flattening is the only way to represent it in rows and columns.

Will numbers and text round-trip correctly?

Within this conversion direction, yes — numbers, strings, booleans, and null are written out as-is. Converting back from CSV to JSON is a separate, lossier step in general (CSV cells are plain text, so "10001" and the number 10001 look identical), which is why this page focuses on the JSON → CSV direction specifically.

Is my data uploaded to do the conversion?

No. The conversion runs in a background Web Worker in your browser using PapaParse — nothing you paste, upload, or drop is ever sent to a server.