Loona Automation logoLoona Developer Tools
Home › Developer Tools › JSON to CSV Converter

JSON to CSV Converter - Turn JSON Arrays into Spreadsheets

In short: the JSON to CSV Converter takes a JSON array of objects and produces a proper CSV file: the columns are the union of every key in the array, values with commas or quotes are quoted correctly, and nested objects are kept as compact JSON inside their cell.

APIs speak JSON; spreadsheets, imports and managers speak CSV. Paste a JSON array below and get a CSV file that opens cleanly in Excel, Google Sheets or any importer - no mangled commas, no broken quotes.

Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the JSON to CSV Converter

  1. Paste a JSON array of objects into the top box (a single object works too - it becomes one row).
  2. Click Convert to CSV.
  3. Review the CSV: the first row is the header, built from every key found in the array.
  4. Copy it or download it as a .csv file, ready for Excel or Google Sheets.

How it works

The converter parses your JSON with the browser built-in parser, then walks every object in the array and collects the union of all keys, in the order they first appear - so an object with an extra field never loses it. Each cell is escaped by the CSV rules: values containing a comma, quote or newline are wrapped in double quotes, and quotes inside are doubled. Numbers and booleans are written plainly, null and missing keys become empty cells, and a nested object or array is written as compact JSON inside its cell so no data is silently dropped.

Worked example

The array [{"name":"Ali","city":"Lahore"},{"name":"Ana","city":"Porto","vip":true}] becomes three columns (name, city, vip): Ali gets an empty vip cell, and Ana gets true - the union-of-keys approach keeps both rows complete.

Frequently Asked Questions

Is this JSON to CSV converter free?

Yes - completely free, with no sign-up, no size limit and no daily cap.

What JSON shapes are accepted?

An array of objects is the main case. A single object becomes a one-row CSV, and an array of plain values (numbers, strings) becomes a single "value" column. Anything else is rejected with an explanation.

What happens to nested objects and arrays?

They are written as compact JSON text inside their cell. Nothing is flattened away or dropped, and converting back with our CSV to JSON tool keeps them readable.

Why do some cells have quotes around them?

CSV rules require quoting when a value contains a comma, a double quote or a newline - otherwise the columns would shift. Excel and Google Sheets read this standard quoting correctly.

Is my data uploaded to a server?

No. Parsing and converting happen 100% in your browser. Your data never leaves your device.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.