JSON to CSV, plain and predictable
JSON to CSV conversion takes a JSON array of flat objects and produces a CSV table. The header row is the union of every key seen across the array, in the order each key first appears. Every object in the array produces one row. Cells are joined with commas; rows are joined with \n line endings. Strings that contain a comma, a double quote, or a line break are wrapped in double quotes, with internal quotes escaped as "" per RFC 4180.
Numbers, booleans and null in the JSON values are emitted as their plain text form (1, true, empty string for null). Nested objects and nested arrays are not flattened; the converter writes them as their compact JSON literal in the cell, so a value of {"a":1} appears as the string {"a":1} wrapped in double quotes. Missing keys on a given row are emitted as empty cells.
If the input is not a JSON array, the parser message is shown in the output panel. For the inverse direction, see CSV to JSON. If you want a YAML representation of the same array, see JSON to YAML.
How to use convert json to csv
- 1Paste a JSON array of objects into the input panel on the left.
- 2The CSV table appears in the output panel on the right as you type.
- 3Click Copy in the output header to copy the CSV.
- 4Click Download to save the result as a
.csvfile. - 5If the input is not an array of objects, fix the parser message shown in the output panel.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Header row is the union of all keys
The converter walks every object in the array and collects every key it sees. Headers appear in the order each one first appeared in the source. Objects that omit a key emit an empty cell in that column, so a sparse JSON array still produces a rectangular CSV.
RFC 4180 quoting on every cell
A cell containing a comma, a double quote, or a line break is wrapped in double quotes. Internal double quotes escape as "". Cells without those characters are written bare. The result imports cleanly into Excel, Google Sheets, Numbers, and every CSV parser that follows RFC 4180.
Primitives become plain text
Numbers emit in the same digit form the JSON parser returned. Booleans emit as true and false. null emits as an empty cell. Strings emit verbatim, with quoting applied only when the string contains a separator or a quote.
Nested values stay as compact JSON
A value that is itself an object or an array is written as its compact JSON literal in the cell. The cell is then quoted because the literal contains commas and braces. The original JSON is round-trippable through JSON.parse on the cell text.
Runs entirely in your browser
No upload, no server-side processing, no log of what you pasted. The parse and emit run on every keystroke. Arrays of a few thousand objects convert in under a second on a desktop browser.
Worked example
Object keys become the header row, each object becomes one CSV row, fields without commas or quotes stay bare.
[
{ "name": "Alice", "email": "[email protected]", "role": "admin" },
{ "name": "Bob", "email": "[email protected]", "role": "user" }
]
name,email,role Alice,[email protected],admin Bob,[email protected],user
Settings reference
| Behaviour | Effect on output |
|---|---|
| Input shape | JSON array of objects. A bare object or scalar is rejected with the parser message. |
| Header row | Union of every key, in first-seen order. |
| Field separator | Comma. |
| Line endings | \n between rows. |
| Quoting | RFC 4180. Cells containing comma, double quote or newline wrap in "..."; internal quotes escape as "". |
| null values | Emit as an empty cell. |
| Numbers and booleans | Emit as 1, true, false in plain text form. |
| Nested objects/arrays | Emit as compact JSON literal inside the cell, then quoted. |
| Missing keys | Object that omits a header key emits an empty cell in that column. |
FAQ
What if my objects have different keys?
How are nested values written?
JSON.parse on that cell text. If you need a flatter shape, transform the JSON first.Can I pick a different field separator?
Is the JSON sent anywhere?
How are null values written?
null becomes an empty cell. That keeps the row width correct and matches the convention most spreadsheet tools use for missing values. If you want the literal text null instead, replace nulls in the JSON before pasting.