JSON to CSV Converter

Convert nested JSON and arrays to CSV instantly — flattens objects to dot-notation columns, handles arrays, runs entirely in your browser.

✓ No upload ✓ No signup ✓ Nested JSON supported ✓ Free forever

Max input size: 1MB. Your JSON is processed locally in your browser and never uploaded. Tip: press Ctrl+Enter to convert.

Input JSON
🔒 Files are read locally in your browser — never uploaded to a server.

CSV Output

Preview

How to Convert JSON to CSV

  1. Paste your JSON array or object into the input box above (or upload a .json file).
  2. Pick your options — delimiter (comma, semicolon, tab) and how arrays should be handled.
  3. Click Convert to CSV. Nested objects are flattened into dot-notation columns automatically.
  4. Download or copy the CSV — open it directly in Excel, Google Sheets, or Numbers.

Nested JSON Example

Given this input:

[
  { "id": 1, "user": { "name": "Alice", "city": "NYC" }, "tags": ["admin","beta"] },
  { "id": 2, "user": { "name": "Bob",   "city": "SF"  }, "tags": ["user"] }
]

You get:

id,user.name,user.city,tags
1,Alice,NYC,"admin|beta"
2,Bob,SF,user

Do It in Code

If you'd rather convert in a script:

# Python
import json, csv, io
data = json.load(open("data.json"))
keys = data[0].keys()
with open("out.csv","w",newline="") as f:
    w = csv.DictWriter(f, fieldnames=keys); w.writeheader(); w.writerows(data)
// Node.js
const data = require("./data.json");
const headers = Object.keys(data[0]);
const csv = [headers.join(","), ...data.map(r => headers.map(h => JSON.stringify(r[h] ?? "")).join(","))].join("\n");
# jq one-liner
jq -r '(.[0] | keys_unsorted) as $k | $k, map([.[ $k[] ]])[] | @csv' data.json

Why Use json2csv?

🔒 Private by Design

Everything runs in your browser. No file ever leaves your device — safe for confidential data, API exports, and PII.

🌳 Nested JSON Handled

Deep objects are flattened into dot-notation columns. Arrays can be joined into one cell or kept as JSON text.

⚡ Instant & Free

No signup, no limits, no ads injected into the tool. Convert, copy, download — done in seconds.

📊 Excel & Sheets Ready

Pick comma, semicolon, or tab delimiter to match Excel (any locale), Google Sheets, or Numbers without breakage.

🛠️ Built for APIs

Designed for API responses, AI-generated data, MongoDB exports, and analytics dumps that need to land in a spreadsheet.

⌨️ Power-User Friendly

Keyboard shortcuts, instant preview, file drag-and-drop, and a dark/light theme that respects your system preference.

More JSON Tools

Continue working with your data using related browser-based tools.

CSV → JSON

Convert spreadsheet-style CSV data back into JSON.

CSV to JSON Converter

JSON Formatter

Beautify, validate, and minify JSON syntax.

JSON Formatter

JSON Viewer

Explore nested JSON in a readable tree view.

JSON Viewer

JSON Diff

Compare two JSON files or API responses.

JSON Diff

AI JSON Fixer

Repair malformed JSON from ChatGPT, Claude, and Gemini.

Fix AI JSON ↗Opens sister site llmjsonfixer.com

Privacy First

All conversions happen locally in your browser.

Privacy Policy

Frequently Asked Questions

How do I convert nested JSON to CSV online for free?

Paste your JSON array or object into the input box and click Convert to CSV. The tool flattens nested objects into dot-notation columns and outputs CSV instantly in your browser. There's no signup and nothing is uploaded.

How are nested JSON objects flattened into CSV columns?

Nested objects are flattened using dot notation, so address.city becomes its own CSV column. This keeps deeply nested API responses and AI-generated JSON readable as a flat table that Excel and Google Sheets understand.

How does the converter handle arrays inside JSON?

You choose: join simple arrays into a single cell (e.g. "admin|beta") or keep arrays as JSON text. This lets you control how list values appear in your CSV.

Can I choose a comma, semicolon, or tab delimiter?

Yes. The converter supports comma, semicolon, and tab delimiters — match whatever your spreadsheet locale or import tool expects. European Excel typically wants semicolons; US Excel and Google Sheets want commas.

Is the JSON to CSV converter safe and private?

Yes. All conversion happens locally in your browser using JavaScript. Your JSON never leaves your device — safe for confidential data, PII, and proprietary API responses. Maximum input size is 1MB.

What's the difference between JSON and CSV?

JSON represents hierarchical, nested data — perfect for APIs and configuration. CSV is a flat, tabular format — perfect for spreadsheets and analytics tools. This converter bridges the two by flattening nested structures into columns.

Can I convert large JSON files?

The browser-based tool handles files up to about 1MB comfortably. For larger datasets, use the Python or Node.js snippets shown in the Do It in Code section above.