Skip to content
SmaftyTools

JSON to CSV

Convert a JSON array to CSV with automatic column detection and proper quoting. Free online JSON to CSV converter.

About JSON to CSV

The JSON to CSV converter flattens a JSON array into spreadsheet-ready CSV. Column headers are detected automatically across every object in the array — even when some objects are missing keys that others have — and values containing commas, quotes or line breaks are quoted correctly so the file opens cleanly in Excel and Google Sheets instead of splitting into the wrong columns.

It's built for the common cases developers and analysts run into constantly: exporting a JSON API response into a spreadsheet a non-technical stakeholder can open, converting a MongoDB or Firestore export into a CSV report, turning a JavaScript array of objects into a downloadable file without writing a script, or reshaping analytics JSON logs into rows for a pivot table — all without leaving the browser to convert json to csv by hand. It accepts both an array of objects (keys become the header row) and a plain array of arrays (rows used as-is).

Nested objects and arrays inside a record aren't dropped — they're serialized as JSON strings within the cell, so a nested field shows up intact as text rather than silently disappearing. Delimiter choice (comma, semicolon or tab) matters more than it might seem: several European locales treat comma as a decimal separator, so spreadsheets there expect a semicolon-delimited json csv converter output to avoid misreading numeric columns.

For the cleanest spreadsheet output, flatten deeply nested structures into flat key-value pairs before converting — a JSON to CSV converter can't guess how you want a nested object split across columns, so it preserves the structure as text instead of making that decision for you. Conversion runs entirely client-side, so exported records never leave the browser.

How to Use the JSON to CSV

  1. Paste a JSON array, e.g. [{"name": "Ada", "age": 36}].
  2. Choose a delimiter if you need semicolons or tabs.
  3. Copy the CSV and paste it into your spreadsheet, or save it as a .csv file.

Features

  • Automatic column detection across all objects
  • Proper quoting for commas, quotes and newlines in values
  • Array-of-objects and array-of-arrays input
  • Comma, semicolon and tab output

Examples

Converting an array of objects

Input

[{"name":"Ada","age":36},{"name":"Grace","age":85}]

Output

name,age
Ada,36
Grace,85

Handling objects with missing keys

Input

[{"a":1,"b":2},{"a":3}]

Output

a,b
1,2
3,

Quoting a value with a comma

Input

[{"city":"Paris, France"}]

Output

city
"Paris, France"

Frequently Asked Questions

What happens to nested objects?

They're embedded as JSON strings in the cell, so no data is lost. For fully flat output, flatten the structure before converting.

How do I open the result in Excel?

Copy the output into a file saved as .csv and open it, or paste directly into a sheet and use the text-to-columns feature. Use the semicolon delimiter if your locale expects it.

Does column order stay consistent across rows?

Yes — headers are collected once from the union of all keys across every object, in the order they're first encountered, so every row lines up under the correct column even if individual objects list their keys in a different order.

Is the JSON to CSV converter free?

Yes, the JSON to CSV converter is completely free with no usage limits. No signup, no account and no installation required.

Is my data safe?

Yes. All processing happens locally in your browser using JavaScript — nothing you type is uploaded or stored on our servers.