JSON to CSV Converter Online — Free & Instant

Flatten a JSON array of objects to RFC 4180 CSV with auto-inferred headers and proper quoting — open the output directly in Excel, Sheets, or pandas.

What is a JSON to CSV converter?

A JSON to CSV converter turns a JSON array of objects into rows of comma-separated values, with one column per JSON key. The result opens directly in Excel, Google Sheets, Numbers, pandas, or any database that imports CSV. It's the fastest way to hand structured API data to analysts, finance teams, or anyone who lives in spreadsheets.

OpenFormatter's converter infers headers from the union of every key in every row — so no field is silently dropped when later objects have extra properties. Values containing commas, double-quotes, or newlines are escaped per RFC 4180. Nested objects are stringified into their cell as JSON; if you need full flattening, pre-process with jq before pasting.

How to convert JSON to CSV online — 4 steps

  1. Paste a JSON array. Copy an API response, database export, or log batch into the Input panel. The top level must be an array — wrap a single object in [ ] if needed.
  2. Click Convert. The tool parses the array, computes the header as the union of all keys, and writes RFC 4180 CSV in your browser.
  3. Inspect the rows. Row 1 is the header. Each subsequent row maps values in the same column order — empty cells appear where a row was missing that key.
  4. Paste into Excel or Sheets. Click Copy and paste into row A1 of a spreadsheet, or save the output as data.csv and double-click to open it.

Sample JSON and CSV output

Input JSON

[
  { "id": 1, "name": "Alice Chen", "email": "alice@example.com", "city": "London" },
  { "id": 2, "name": "Bob Smith", "email": "bob@example.com", "city": "Berlin, DE" },
  { "id": 3, "name": "Carol \"Caz\" Lee", "email": "carol@example.com", "city": "Tokyo" }
]

Output CSV

id,name,email,city
1,Alice Chen,alice@example.com,London
2,Bob Smith,bob@example.com,"Berlin, DE"
3,"Carol ""Caz"" Lee",carol@example.com,Tokyo

Union-of-Keys Header

Headers come from every key in every row, not just the first object — so rows with extra fields never lose data when converted.

RFC 4180 Compliant

Commas, quotes, and newlines inside values are properly quoted and escaped. The result parses cleanly in Excel, pandas, and every CSV reader.

Client-Side Only

Conversion runs in your browser. JSON containing customer records, PII, or proprietary data never leaves your device.

Common use cases

  • check_circleExporting REST API responses to Excel, Google Sheets, or Numbers for analysis by non-developers
  • check_circleBulk-loading JSON records into PostgreSQL, MySQL, or BigQuery via COPY / LOAD DATA from CSV
  • check_circleFeeding JSON event logs into BI tools (Tableau, Power BI, Looker) that expect flat tables
  • check_circleGenerating CSV fixtures from JSON test data for spreadsheet-based QA workflows
  • check_circleProducing CSV deliverables for finance, operations, and customer-success teams from API queries
  • check_circleConverting MongoDB aggregation results to CSV for ad-hoc reporting and email distribution
  • check_circlePreparing CSV for ML pipelines (pandas, scikit-learn, R) that ingest tabular data more naturally than JSON
  • check_circleMigrating data between SaaS platforms whose import/export formats are CSV-only (Mailchimp, HubSpot, Stripe)

CSV vs TSV: which delimiter should you pick?

CSV is the universal default — every spreadsheet, database, and analytics tool reads it. The trade-off is escaping: any value containing a comma must be wrapped in quotes, and any internal quotes must be doubled. If your data is full of free-text fields with commas (addresses, descriptions, product names), TSV — using tab as the delimiter — produces a cleaner, smaller file because tabs almost never appear inside values. For pandas users, both work; pd.read_csv(sep='\\t') reads TSV. Use the JSON to TSV converter if your downstream consumer prefers tabs.

Need a different output format?

Convert JSON to TSV, XML, or YAML — or round-trip CSV back to JSON — all in your browser.

Frequently Asked Questions

How are nested JSON objects handled?

CSV is a flat 2-D format with no native concept of nesting. This converter stringifies nested objects and arrays as JSON inside their cell, so {"address": {"city": "London"}} produces a cell containing the literal text {"city":"London"}. If you need true flattening (one cell per leaf field, with dotted keys like address.city), pre-process the JSON or use a library like flat or json2csv with a custom transform.

How does the tool infer the CSV header?

The header is the union of every key that appears in any row, in first-seen order. So if row 1 has {a, b} and row 2 has {b, c, d}, the header is a, b, c, d — no field is dropped. This is more forgiving than libraries that take only row 1's keys, which silently lose data when later rows have additional fields.

What happens if rows have different keys?

Missing keys produce empty cells in those rows. The CSV is still rectangular: every row has the same number of columns, with blanks where the source object did not have that key. This is the safest behaviour — no exceptions, no silently shifting columns.

Are commas, quotes, and newlines in values escaped?

Yes — the converter follows RFC 4180. A field containing a comma, double-quote, or newline is wrapped in double-quotes, and any internal double-quotes are doubled (so they appear as ""). A value like Carol "Caz" Lee becomes "Carol ""Caz"" Lee" in the CSV.

Why is row 1 of my output not a data row?

The first line of the CSV is the header row — the column names derived from your JSON keys. Spreadsheet apps (Excel, Sheets, Numbers) treat row 1 as headers automatically. If you want a headerless CSV, delete the first line after copying or wrap the converter with a "no header" option in your own pre-processor.

Can I open the result directly in Excel?

Yes. Save the output as a .csv file and double-click — Excel parses standard comma-separated values and quoted fields correctly. For European locales where the regional separator is a semicolon, use Data → From Text/CSV and pick comma as the delimiter, or use the JSON to TSV tool instead.

What if my JSON is a single object, not an array?

The converter requires the top level to be an array. Wrap a single object in brackets — change {"a": 1} to [{"a": 1}] — and it will produce a one-row CSV. If your JSON has the records nested (e.g. {"data": [...]}), extract the array first using a JSON formatter or jq.

Is my JSON sent to a server?

No. Conversion runs entirely in your browser using JavaScript. JSON containing PII, customer records, or financial data never leaves your device. Open DevTools Network tab and verify — no request fires when you click Convert.

JSON to CSV Converter Online — Free & Instant