ConvertCSV

How to Convert JSON to CSV Without Coding

By Convert CSV Editorial TeamLast updated August 1, 2026

Flatten JSON arrays into spreadsheet-ready CSV. Learn how nested keys become columns, fix common errors, and export clean files for Excel and Sheets.

What JSON to CSV Conversion Does

Converting JSON to CSV flattens structured JSON—usually an array of objects—into a spreadsheet table. Object keys become column headers. Each object becomes one row.

This is how API responses become something finance, operations, and students can open in Excel or Google Sheets without reading braces.

[
  {"sku": "A-100", "qty": 12, "warehouse": "DAL"},
  {"sku": "B-220", "qty": 3, "warehouse": "TOR"}
]

CSV result

The same payload becomes:

sku,qty,warehouse
A-100,12,DAL
B-220,3,TOR

Why JSON to CSV Matters

Developers live in JSON. Stakeholders live in spreadsheets. JSON to CSV is the translation layer that keeps both groups unblocked.

  • Turn REST API responses into shareable tables.
  • Give analysts a CSV they can pivot without learning jq.
  • Prepare imports for tools that reject JSON uploads.
  • Debug API payloads visually as rows and columns.

How Nested JSON Becomes Columns

Flat objects convert cleanly. Nested objects need flattening rules.

JSON shapeTypical CSV handling
Array of flat objectsOne column per key
Nested object (address.city)Often flattened to address.city or address_city
Array of primitivesJoined into one cell or expanded with extra logic
Mixed keys across objectsUnion of all keys; missing values left blank
Single object (not an array)One-row CSV after wrapping/normalization

Example with nesting

A nested address often becomes extra columns rather than a nested cell.

[
  {
    "name": "Sam Patel",
    "address": {"city": "Toronto", "country": "CA"}
  }
]

Flattened CSV example

After flattening, you may see columns such as name, address.city, and address.country.

name,address.city,address.country
Sam Patel,Toronto,CA

Step-by-Step: Convert JSON to CSV Online

Use Convert CSV Online when you want a previewable table without writing a script.

  • Open the JSON to CSV Converter.
  • Paste a JSON array or upload a .json file.
  • Confirm the JSON is valid—trailing commas and single quotes will fail.
  • Convert and preview the resulting columns.
  • Check nested key names and blank cells for sparse objects.
  • Download CSV, or continue to CSV to Excel if stakeholders want .xlsx.

Validate before you share

Open the downloaded CSV in the Online CSV Editor to verify row counts and headers. If analysts need Excel formatting later, use the CSV to Excel Converter after the CSV looks right.

Optional Node.js approach

For recurring jobs, automate the conversion in code. Online tools remain best for one-off API dumps.

import fs from "node:fs";

const rows = JSON.parse(fs.readFileSync("data.json", "utf8"));
const headers = [...new Set(rows.flatMap((row) => Object.keys(row)))];
const escape = (value) => `"${String(value ?? "").replaceAll('"', '""')}"`;

const lines = [
  headers.join(","),
  ...rows.map((row) => headers.map((key) => escape(row[key])).join(",")),
];

fs.writeFileSync("data.csv", lines.join("\n"));

JSON vs CSV Decision Guide

Keep JSON when structure is nested or consumed by apps. Switch to CSV when humans need columns.

SituationKeep JSONConvert to CSV
Shipping an API response to frontend codeYesNo
Emailing results to financeNoYes
Deeply nested line itemsYes (or normalize first)Only after flattening
Uploading to a CSV-only portalNoYes

Real-World Examples

These workflows show up constantly in product and data teams.

Support exports a JSON ticket dump

A helpdesk API returns ticket objects. Support leadership wants a CSV for weekly triage in Sheets. JSON to CSV creates the working table in minutes.

Engineers share sample payloads with QA

QA prefers rows they can filter. Engineers paste a sanitized JSON array into the converter and send CSV fixtures instead of raw payloads.

Students transform open data

Open-data portals often offer JSON. Coursework still asks for CSV charts in Excel. Conversion avoids manual copy-paste errors.

Common Mistakes

If the CSV looks wrong, inspect the JSON shape before blaming the tool.

  • Pasting a JSON object stream or NDJSON without confirming the converter expects an array.
  • Invalid JSON: trailing commas, comments, or single-quoted keys.
  • Huge nested arrays that explode into unusable wide tables.
  • Assuming all objects share the same keys—sparse fields create blank cells.
  • Opening the CSV in Excel without checking delimiter/encoding.
  • Losing type nuance—JSON null/true/false may become text in CSV.

Best Practices

Flatten with intent, then verify with a spreadsheet preview.

  • Prefer an array of similar objects as input.
  • Normalize nested data before conversion when line items matter.
  • Rename awkward keys after conversion if needed in the Online CSV Editor.
  • Keep a copy of the original JSON for traceability.
  • Convert CSV back to JSON only after spreadsheet edits are finished.

Why Use Convert CSV Online?

The JSON to CSV Converter on Convert CSV Online is free, fast, and browser-based. Everyday conversions need no account and no install. It works through the browser on Windows, macOS, and Linux, with client-side processing for these workflows.

Files over roughly 5 MB may strain a browser tab. Use scripts for massive ETL; use the online tool for the API responses and exports people actually paste into Slack and email.

Flatten your JSON now

Paste your JSON array into the JSON to CSV Converter, preview the table, and download spreadsheet-ready CSV.

Conclusion

JSON to CSV turns developer payloads into tables anyone can filter and share. Start with valid JSON, understand flattening, and preview before you send the file.

Next: Excel to CSV—for workbook exports that need to become portable text tables.

FAQ

How do I convert JSON to CSV without coding?

Paste or upload your JSON into an online JSON to CSV converter, preview the flattened columns, and download the CSV. Convert CSV Online provides a free browser tool for this.

Can nested JSON be converted to CSV?

Yes, but nested objects are flattened into additional columns or otherwise normalized. Deep or irregular nesting may need cleanup before or after conversion.

Why is my JSON to CSV output missing columns?

If objects in the array use different keys, some rows will have blank cells. Check whether your JSON records are inconsistent.

Does the input need to be a JSON array?

Most spreadsheet conversions work best with an array of objects. A single object can become one row, but arrays are the usual input shape.

Can I open the result in Excel?

Yes. Download CSV and open it in Excel or Google Sheets, or convert the CSV to .xlsx with a CSV to Excel converter for a native workbook.

What if my JSON is invalid?

Fix syntax issues first—trailing commas, comments, and single quotes are common problems. Valid JSON is required before conversion.

References

Convert your CSV in the browser

Preview, clean, and convert CSV files free with Convert CSV Online—no installation and no account required for everyday conversions.