JSON to CSV Converter

Paste a JSON array of objects and get a clean, properly quoted CSV instantly — nested objects flatten to dot-notation columns, headers merge across every object, and you can copy or download the result. Runs entirely in your browser.

Every conversion runs in your browser — your JSON is never uploaded to a server.

Turning JSON into a spreadsheet-ready CSV

APIs, database exports, and log tools speak JSON, but spreadsheets, BI tools, and CRM importers want rows and columns. Converting by hand means writing a script for a one-off task, and general spreadsheet "open as CSV" tricks don't flatten nested objects or handle commas hidden inside text fields. This converter does the whole job in the browser: paste an array of JSON objects, and it works out the column headers, flattens nested fields, quotes anything that needs it, and gives you a CSV ready to paste into Excel, Google Sheets, or Airtable.

How the conversion works

Example — flattening and union headers. Input: [{"id":1,"name":"Alice","address":{"city":"Seoul"}},{"id":2,"name":"Bob"}]. Because the second object has no address, the header row becomes id,name,address.city and Bob's row ends with an empty last cell — the CSV still lines up correctly.

Example — a value that needs quoting. Input: [{"city":"Seoul","note":"Great food, cheap rent"}]. Because the note contains a comma, the tool outputs "Great food, cheap rent" in quotes so spreadsheet software still reads it as one field, not two.

Choosing a delimiter

Comma is the default and works almost everywhere. Some regional Excel builds treat comma as the decimal separator and expect semicolon-separated files instead — switch the delimiter dropdown to semicolon if numbers or columns look merged after opening the file. Tab-separated output is useful for pasting straight into a spreadsheet cell or a plain-text pipeline that treats commas as ordinary characters.

Reading the error messages

Invalid JSON is reported with the exact line and column of the failure and a short excerpt with a caret pointing at the problem character, so you don't have to scan a large paste line by line. The three most common issues are a trailing comma after the last array or object item, single quotes instead of the double quotes JSON requires, and an unescaped double quote inside a string. An empty array, or a JSON value that isn't an array or object (a bare number, string, boolean, or null), is reported separately since there's nothing to turn into table rows.

Sources & further reading

Frequently asked questions

How do I convert a JSON array of objects to CSV?

Paste a JSON array of objects into the input box — for example, [{"name":"Alice","age":30},{"name":"Bob","age":25}] — and the CSV appears in the output box instantly as you type, with no button to click. The converter reads the keys from your objects and uses them as column headers in the order they first appear, so the example above produces a two-column CSV with the header row name,age followed by one data row per object. Once the CSV looks right you can copy it to your clipboard or download it as a .csv file with one click. A single JSON object that isn't wrapped in an array is also accepted and is treated as a one-row table.

How are nested objects and arrays converted to CSV columns?

CSV is a flat, two-dimensional format, so nested JSON has to be flattened before it fits into rows and columns. This converter flattens nested objects using dot notation — a value like {"user":{"name":"Alice","age":30}} becomes two columns named user.name and user.age — so you can always trace a cell back to its original path. Arrays found inside a value, such as ["red","green","blue"], are kept as their raw JSON text in a single cell instead of being split across more columns, because array length can vary from object to object and splitting them would make the column count unpredictable. If you need array items in their own columns, flatten that part of your data first, or restructure it so each array element becomes its own object.

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

Real-world JSON exports are rarely perfectly uniform, so this tool builds its header row from the union of every key found across every object, in the order each key first appears. If one object is missing a key that other objects have, the cell in that row is simply left empty instead of causing an error or shifting the other columns out of alignment. That means you can safely paste JSON where, for instance, some records include a phone field and others don't — every row still lines up under the correct header. The count shown above the output box, such as "3 rows × 5 columns", reflects this combined header set rather than any single object's own key count.

My JSON won't convert — how do I find and fix the error?

When the pasted text isn't valid JSON, the converter doesn't just say "invalid" — it reports the exact line and column where parsing failed, shows the underlying parser message, and displays a short excerpt of that line with a caret (^) pointing at the problem character. The most common causes are a trailing comma after the last item in an array or object, single quotes used instead of double quotes around keys and strings, or an unescaped double quote inside a string value. Fix the highlighted spot and the CSV regenerates automatically the moment the JSON becomes valid again, with no button to click.

Will the CSV open correctly in Excel, and is my data uploaded anywhere?

The generated CSV follows the RFC 4180 standard: any value that contains the chosen delimiter, a double quote, or a line break is automatically wrapped in quotes with internal quotes doubled, so commas and line breaks inside your data never break the column alignment. If your Excel locale uses a comma as the decimal separator, switch the delimiter dropdown to semicolon or tab before downloading so the file opens in the correct number of columns; downloaded files also carry a UTF-8 byte-order mark so accented and non-Latin characters display correctly instead of turning into garbled symbols. Every conversion happens locally in your browser using JavaScript — your JSON is never uploaded to a server, logged, or stored anywhere except your own browser's local storage, which only remembers your last input so a page refresh doesn't lose it.