JSON to CSV Converter

Flatten a JSON array of objects into CSV for a spreadsheet. Every key found in any object becomes a column, and it all runs on your device.

Updated

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 get CSV back, with one column per key and one row per object. The columns are the union of every key across all the objects, so ragged data still lines up, and any field containing a comma, quote or line break is escaped 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 also works and is wrapped in one). The header row lists every key the tool found, each object becomes a row, and a cell is blank where an object lacks that key. The box starts with a small example, the output updates as you type, and you can copy it or download data.csv.

CSV opens in any spreadsheet and almost every other program imports it, which makes this the quickest route from JSON or API output into Excel, Google Sheets or a reporting tool.

How it works

It parses the JSON, then reads through all the objects to collect the full set of column names. An object missing a field still gets that column, left blank, so the rows line up.

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

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, all in your browser.

  1. Step 1. Parse the input as JSON; a single object is treated as a one-item array.
  2. Step 2. Go through every object and collect the union of all keys. These become the columns, in the order first seen.
  3. Step 3. Write one row per object 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, then copy or download data.csv.

Privacy

The JSON you paste is parsed in your browser and is not sent anywhere.

Nothing is saved; refresh the page and the data is gone.

You can use it on 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 only
Downloaddata.csv
Where it runsIn your browser, as you type

Standards and 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 used for the output, so it imports cleanly.

Accuracy and limits

Flat objects only. A nested object comes out as the literal text [object Object], and an array as its comma-joined values in one cell; neither expands into separate columns. For clean columns, flatten nested JSON first with the JSON flattener.

Columns appear in the order their keys are first seen, not in alphabetical order.

Values are written as they are, so numbers and booleans become plain text. That is normal for CSV, which has no data types.

Excel can re-type CSV values when it opens the file, stripping leading zeros and turning codes into dates. That comes from Excel, not this tool. Import through Data → From Text/CSV as Text to avoid it.

Real-world uses

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 takes CSV but not JSON.

Sharing as a table

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

Comparing records

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

When it fits, and when it doesn't

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
  • Keeping exact data types
  • Producing a real .xlsx file

Flatten nested JSON first with the JSON flattener. For a real spreadsheet file instead of CSV text, use JSON to Excel. If Excel re-types the CSV, import it through 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 and is treated as a one-row array.
How are the columns chosen?
It takes the union of every key across all the objects, so if objects have different fields, each field still gets a column. Missing values are left blank.
What happens to objects that are missing some keys?
Those cells are left empty. The columns come from the union of all keys, so the rows still line up.
Does it handle nested objects or arrays?
It doesn't expand them. A nested object shows as the text [object Object] and an array as its comma-joined values in one cell. Flatten the JSON first if you want proper columns.
How are commas and quotes inside values handled?
As RFC 4180 says: a value containing a comma, double quote or line break is wrapped in quotes and its inner quotes are doubled, so other programs parse the CSV correctly.
Will Excel mangle the CSV when I open it?
It can. Excel may strip leading zeros or turn codes into dates when it opens a CSV. Instead of double-clicking the file, import it through Data → From Text/CSV and set the columns to Text.
Is my data uploaded?
No. The conversion runs in your browser, and nothing you paste is sent or saved.
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, the usual CSV convention and the one RFC 4180 uses.
What order are the columns in?
The order in which keys first appear as the objects are read. The first object's keys come first, and new keys from later objects are added to the end.
How is this different from JSON to Excel?
This gives you CSV text, which is light and opens almost anywhere. JSON to Excel gives you a real .xlsx workbook. Pick CSV for portability and .xlsx when someone needs an Excel file.
Does it sort or change my data?
No. Values stay as they are; the tool only adds the quoting that valid CSV needs.

References

Columns come from the union of all keys and fields are escaped per RFC 4180. Only one level is flattened, so nested objects and arrays stay in a single cell.

Popular

CSV to JSON Converter

Turn CSV rows into a clean JSON array of objects, with the header row as the keys. The data stays in your browser.

DocumentOpen Tool

CSV to Excel Converter

Turn pasted CSV into a real .xlsx workbook with SheetJS. Cells are written as text, so Excel can't strip leading zeros or turn codes into dates when the file opens.

DocumentOpen Tool

Excel to CSV Converter

Pull the first sheet of an Excel workbook out to plain CSV in your browser. Formulas become their values, and the file stays on your computer.

DocumentOpen Tool
Trending

Markdown to HTML

Convert the Markdown you use every day (headings, emphasis, code, links, images and bullet lists) to clean HTML in your browser. It covers a subset of Markdown, not full CommonMark.

DocumentOpen Tool

Word to Text Extractor

Extract the plain text from a Word .docx file in your browser. You get the words without the formatting, and your document is read on your device instead of being uploaded.

DocumentOpen Tool
PopularHot

Image Compressor

Compress an image to JPEG with a quality slider and watch the file size drop as you drag, in your browser.

ImageOpen Tool

Back to the JSON to CSV Converter

Paste or pick your input at the top of the page. The conversion runs on this device and needs no account.