About JSON to CSV
Drop in a JSON array of objects and get a CSV with nested keys auto-flattened in dot notation. Pick delimiter (comma, tab, semicolon, custom), quote style (always, when-needed), and line ending (LF, CRLF). A live preview shows the column types inferred from the data so the receiving spreadsheet does not surprise you.
Why convert JSON to CSV?
Spreadsheets, BI tools, and most data scientists still want CSV. JSON is great for APIs and configs; CSV is what you hand to Excel, Google Sheets, Tableau, or pandas.read_csv. The conversion is straightforward in flat cases — and surprisingly nasty when objects nest, when arrays mix types, or when keys differ across rows.
This converter does the boring part well: handles missing keys, flattens nested paths consistently, quotes per RFC 4180, and emits exactly the file your spreadsheet expects.
How flattening works
Input:
[{
"id": 1,
"user": { "name": "Ana", "email": "ana@example.com" },
"tags": ["admin", "billing"]
}]
Output:
id,user.name,user.email,tags
1,Ana,ana@example.com,"admin, billing"
Dot notation for nested objects, joined string for primitive arrays, indexed paths for object arrays. The naming is predictable so a downstream consumer can re-shape it back if needed.
Common workflows
Hand off API data to a non-developer. Fetch the JSON, paste here, download the CSV, share. They open it in Sheets, do their analysis, you skip the meeting.
Diff structured exports. Run two exports through this, then drop both CSVs into the Diff Checker. Useful for catching silent schema drift between environments.
Bulk import to your warehouse. Most warehouses’ COPY commands prefer flat CSV. Transform here, run the load, skip the row-by-row API path.
Convert back round-trip. Use CSV to JSON to verify your flattening preserves all the data — every dot-key reconstructs back into the same nested shape.
Settings that matter
- Delimiter — comma is universal; tab gives you
.tsv, no quoting issues with commas. - Line ending — LF for Unix tooling, CRLF for Windows Excel.
- Quote — when-needed (RFC 4180) is the default; quote-all if downstream is paranoid.
- Date format — ISO 8601 always parses; locale formats save formatting steps in spreadsheets.
The right combination depends on the receiver. Default RFC 4180 + UTF-8 + LF works in 90% of cases.
Frequently asked questions
How are nested objects flattened?
{"user":{"name":"Ana"}} becomes a user.name column. Arrays of primitives become a single column joined by your chosen separator; arrays of objects become indexed paths (items.0.sku, items.1.sku).Can I customize the delimiter?
What about quoting?
How does it handle missing keys?
null, your choice). Type inference still works on the present values.Is it the right tool for very large JSON?
jq -r with @csv, or a Python script with ijson.Can it handle a top-level object?
Related tools
Last updated: 2025-01-15