JSON to CSV Converter

Flatten a JSON array of objects into a spreadsheet-ready CSV — the columns are the union of every key. Runs locally.

Document ToolsPopular Free No upload Instant

Loading JSON to CSV Converter…

Your browser is preparing the tool. It runs 100% locally.

Quick Answer

Paste a JSON array of objects and this returns CSV with one column per key and one row per object. It gathers the union of every key across all the objects, so even ragged data lines up, and it escapes any field containing a comma, quote or line break the RFC 4180 way. It handles flat objects; nested objects and arrays don't expand into columns.

What the JSON to CSV Converter Does

Paste a JSON array (a single object works too — it gets wrapped) and the tool returns CSV whose header is every key it found, with one row per object and blanks where an object lacks a key. It opens on a small example, updates live, and offers copy or download as data.csv.

CSV opens in any spreadsheet and imports into almost everything, so this is the quickest way to get JSON or API output into Excel, Google Sheets or a reporting tool.

How It Works

It parses the JSON, then scans across all the objects to build the complete set of column names — so an object missing a field still gets that column, left blank, and the rows always line up.

Each object becomes a row in that column order. Any value containing a comma, double quote or line break is wrapped in quotes with inner quotes doubled, exactly as RFC 4180 prescribes.

Data source & conversion logic

No external data. The input is parsed as JSON (RFC 8259 and ECMA-404) and the output is written as RFC 4180 CSV — entirely in your browser.

  1. Step 1. Parse the input as JSON; if it's a single object, treat it as a one-item array.
  2. Step 2. Walk every object to collect the union of all keys — these become the columns, in first-seen order.
  3. Step 3. For each object, emit a row with each column's value, leaving missing keys blank.
  4. Step 4. Quote and escape any field that contains a comma, quote or line break (RFC 4180).
  5. Step 5. Join the rows with line breaks; copy or download data.csv.

Privacy

The JSON you paste is parsed in your browser; nothing is sent anywhere.

Nothing is stored — refresh and it's gone.

Safe for sensitive records, since the data never leaves your device.

Technical Details

InputJSON array of objects (or one object)
OutputCSV, comma-delimited
ColumnsUnion of all keys (first-seen order)
Missing keysEmpty cell
EscapingRFC 4180 (inner quotes doubled)
NestingNot expanded — flat objects
Downloaddata.csv
Where it runsIn your browser, live

Standards & references

  • JSON (RFC 8259 / ECMA-404) — the input syntax the tool parses — objects, arrays and the six value types.
  • RFC 4180 — the CSV quoting and escaping rules applied to the output so it imports cleanly.

Accuracy & Limitations

Flat objects only. A nested object becomes the literal text [object Object], and an array becomes its comma-joined values inside one cell — neither expands into separate columns. Flatten nested JSON first (the JSON flattener does this) for clean columns.

Column order follows the order keys are first seen across the objects, not any alphabetical sort.

Values are written as-is, so numbers and booleans become their plain text form — which is normal for CSV, since CSV has no types.

If you'll open the result in Excel, note that Excel can re-type CSV values on open (stripping leading zeros, turning codes into dates). That's Excel's behaviour, not this tool's — import via Data → From Text/CSV as Text to avoid it.

Real-World Use Cases

JSON into a spreadsheet

Get API or app output into Excel or Google Sheets as rows and columns.

Reporting and BI

Prepare JSON data for a tool that ingests CSV rather than JSON.

Sharing as a table

Hand someone a readable table instead of a block of JSON.

Diffing records

Lay JSON records out as rows to compare them line by line.

When to use it — and when not to

Good for

  • Flat JSON arrays into a spreadsheet
  • Sharing JSON as a table
  • Importing into Sheets or Excel
  • Turning API output into rows

Not the best choice for

  • Deeply nested JSON
  • Preserving exact data types
  • Producing a real .xlsx file

Nested JSON? Flatten it first with the JSON flattener. Want a real spreadsheet file rather than CSV text? Use JSON to Excel. Worried about Excel re-typing the CSV? Import via Data → From Text/CSV as Text.

Frequently Asked Questions

What JSON shape does it expect?
An array of objects, where each object is one row and its keys are the columns. A single object also works — it's treated as a one-row array.
How are the columns chosen?
It takes the union of every key across all the objects, so if different objects have different fields, every field still gets a column. Missing values are left blank.
What happens to objects that are missing some keys?
Those cells are left empty. Because the columns come from the union of all keys, the rows still line up correctly.
Does it handle nested objects or arrays?
Not by expanding them. A nested object renders as the text [object Object] and an array as its comma-joined values in a single cell. Flatten the JSON first for proper columns.
How are commas and quotes inside values handled?
Per RFC 4180: any value containing a comma, double quote or line break is wrapped in quotes, and inner quotes are doubled, so the CSV parses correctly elsewhere.
Will Excel mangle the CSV when I open it?
Excel can, on open — stripping leading zeros or turning codes into dates. To avoid it, import through Data → From Text/CSV and set the columns to Text rather than double-clicking the file.
Is my data uploaded?
No. The conversion runs in your browser and nothing you paste is transmitted or stored.
Can I download the CSV?
Yes — copy it from the output, or use Download to save data.csv.
What delimiter does it use?
A comma, following the standard CSV convention and RFC 4180.
What order are the columns in?
The order in which keys are first encountered as the objects are scanned, so the first object's keys lead and any new keys from later objects are appended.
How is this different from JSON to Excel?
This produces CSV text — universal and lightweight. JSON to Excel produces a real .xlsx workbook file. Use CSV for portability, .xlsx when you need an Excel-native file.
Does it sort or change my data?
No. It preserves values as-is and only adds the quoting needed to make valid CSV.

References

Builds columns from the union of all keys and escapes fields the RFC 4180 way — but it flattens only one level, so nested objects and arrays don't expand into columns.

Popular

CSV to JSON Converter

CSV to JSON Converter online: fast, private and free for everyday document work.

DocumentOpen Tool
Trending

Markdown to HTML

Markdown to HTML in seconds — accurate, free and processed locally in your browser.

DocumentOpen Tool

CSV to Excel Converter

Convert with CSV to Excel Converter, preserving structure and data, with zero uploads.

DocumentOpen Tool

Excel to CSV Converter

Excel to CSV Converter online: fast, private and free for everyday document work.

DocumentOpen Tool

Excel to JSON Converter

Convert with Excel to JSON Converter, preserving structure and data, with zero uploads.

DocumentOpen Tool

JSON to Excel Converter

Convert with JSON to Excel Converter, preserving structure and data, with zero uploads.

DocumentOpen Tool

Ready to try the JSON to CSV Converter?

It is free, private and runs entirely in your browser — no sign-up, no uploads, no limits.