JSON to CSV Converter
Convert a JSON array into CSV for a spreadsheet. Nested objects are flattened into dotted column names, columns are the union of all keys across rows, and quoting follows RFC 4180 so values containing commas and newlines survive.
How it works
How columns are chosen
Objects in a JSON array don't have to share keys, so the column set is the union of every key seen across all rows, in the order first encountered. A row missing a key gets an empty cell rather than a shifted row.
If you pass an object instead of an array, the tool looks for the first array-valued property and uses that — which handles the common API shape {"data": [...]} without you having to edit the input.
Flattening nested objects
CSV is flat; JSON is not. With flattening on, {"local": {"model": "qwen"}} becomes a column named local.model. Nested arrays get numeric path segments: tags.0, tags.1.
With flattening off, a nested value is written as JSON inside the cell instead. That is the better choice when you intend to parse the cell later rather than read it.
Quoting, and why it matters
Following RFC 4180, a field is quoted when it contains the delimiter, a double quote, or a line break, and embedded quotes are doubled. This is what stops a value like Smith, John from silently becoming two columns.
Choosing a delimiter: many European locales configure Excel to use semicolons, because the comma is their decimal separator. If your CSV opens as a single column in Excel, switch the delimiter to semicolon.
What people use it for
- Getting an API response into a spreadsheet for someone who doesn't want JSON.
- Importing exported data into a tool that only accepts CSV.
- Eyeballing a large array as a table rather than scrolling nested braces.
- Preparing data for a bulk upload that expects specific column names.
- Flattening a nested structure to see every field a record actually contains.
Nothing is uploaded. This tool runs entirely in JavaScript in your browser. Your input is never sent to a server, never logged and never stored, and no account is required. Once the page has loaded you can go offline and it still works — open your browser's network tab and watch if you'd like to confirm it.
Frequently asked questions
What if my objects have different keys?
The column set is the union of all keys across every row, in first-seen order. A row that is missing a key gets an empty cell, so rows stay aligned.
How are nested objects handled?
With flattening on, nested keys become dotted column names like local.model, and nested array elements get numeric segments like tags.0. With flattening off, the nested value is written as JSON text inside the cell.
Why does my CSV open as one column in Excel?
Excel follows your locale's list separator. In many European locales that is a semicolon, not a comma. Switch the delimiter to semicolon and it will split correctly.
Are values with commas handled correctly?
Yes. Fields containing the delimiter, a double quote or a line break are wrapped in double quotes and embedded quotes are doubled, following RFC 4180.
Can I convert CSV back to JSON?
Not with this tool. This direction is JSON to CSV only.
Tools that run where your code is
This page does its work in your browser because sending your data to a server to process it is a bad default. Catalase applies the same idea to AI coding: a free, open-source code editor that runs language models on your own machine through Ollama, with no account and no telemetry. Cloud models are there when you choose one, not by default.
Related tools
- JSON diff — Compare two JSON documents structurally.
- Markdown table generator — Turn CSV into a Markdown table.
- XML to JSON — Convert XML documents to JSON.