JSON to CSV
Flatten an array of JSON objects — or a single object — into a downloadable CSV file. Nested objects and arrays are flattened automatically.
Smart Flattening
Nested objects and arrays flatten into dot-notation columns automatically.
Handles Large Datasets
Conversions over 200KB run in a Web Worker to keep the UI responsive.
Local Processing
Your data never leaves your browser. Privacy first conversion.
How to Convert JSON to CSV
- Paste a JSON array of objects — the typical shape of an API list response or database export. A single object works too.
- Click Convert.
- Review the CSV in the output pane: one row per object, with nested fields flattened into dot-notation columns.
- Click Download to save it as data.csv, or Copy to paste it straight into a spreadsheet.
Example: Flattening Nested Contacts for a Spreadsheet
Input — array with nested objects and arrays
[
{"name":"Asha","contact":{"email":"[email protected]"},"tags":["lead"]},
{"name":"Bruno","contact":{"email":"[email protected]"},"tags":["customer","eu"]}
]Output — CSV
name,contact.email,tags.0,tags.1 Asha,[email protected],lead, Bruno,[email protected],customer,eu
The nested email becomes a contact.email column, and arrays become indexed columns (tags.0, tags.1). Asha has only one tag, so her tags.1 cell is simply empty.
How flattening handles ragged data
Column headers are the union of every flattened key across all rows — an object missing a field just gets an empty cell, and the longest array in the data decides how many indexed columns exist. That means real-world inconsistent data converts without errors, and you can see at a glance in the spreadsheet which records were missing what.
Spreadsheet-ready output
Rows are separated with CRLF line endings per RFC 4180 — the convention Excel, Google Sheets, and most CSV importers expect — so the downloaded data.csv opens cleanly without a manual import wizard in the common case.
Frequently Asked Questions
Nested object keys are joined with a dot (address.city becomes a column named address.city), and array items are flattened by index the same way (tags.0, tags.1, tags.2). CSV has no concept of nesting, so this dot-notation flattening keeps every value in its own column rather than dumping a raw JSON blob into a cell.
The output columns are the union of every key seen across all rows, in the order first encountered. Rows missing a given key simply get an empty cell there — no error, no dropped rows — so a JSON array with inconsistent shapes (common with optional fields) still converts cleanly.
Yes — a single object converts to a one-row CSV (with its flattened keys as headers), and an array of objects converts to one row per array item. You do not need to wrap a single object in an array first.
No. The conversion and the CSV file itself are both generated entirely in your browser — nothing you paste is ever transmitted anywhere, and the download comes straight from local memory, not a server response.
Yes — the file is written as standard UTF-8 CSV with comma separators and proper quoting for any value containing a comma, quote, or line break, which both Excel and Google Sheets read natively.
Related Tools
JSON Formatter
Make messy, minified JSON readable with customizable indentation.
JSON Beautifier
Pretty-print JSON with the same fast, local engine.
JSON Validator
Check JSON validity with precise line/column errors.
JSON Viewer
Explore JSON as a collapsible, searchable tree.
JSON Minifier
Strip whitespace to compress JSON for transport.
JSON Compare
Diff two JSON documents and highlight the changes.