JSON to CSV Downloader — Export JSON Data as CSV File
Convert JSON arrays to CSV — nested flattening · custom delimiter · live preview · Excel download · 100% Free
One-click JSON to CSV export with direct file download — no copy-paste, no manual saving. Configure your export: choose delimiter, select which fields to include, set file name and encoding. The download button creates a proper .csv file that opens correctly in Excel, Google Sheets and any data analysis tool. Perfect for generating reports from API data.
What is JSON to CSV Conversion?
JSON to CSV conversion transforms JavaScript Object Notation (JSON) data into Comma Separated Values (CSV) — a flat, plain-text format that can be opened in Microsoft Excel, Google Sheets, LibreOffice Calc, or imported into any database. CalcNation's JSON to CSV converter handles nested objects, arrays, inconsistent keys, and custom delimiters — all 100% in your browser.
Options Explained
Flatten Nested JSON — Converts nested objects to dot-notation columns. E.g. { "address": { "city": "X" } } becomes the column address.city. Flatten Arrays — Expands array items to separate columns: tags[0], tags[1]… Delimiter — Choose comma (standard), semicolon (European Excel), tab (TSV for Excel paste), pipe, or a custom character. Header Row — Toggle whether the first CSV row contains column names.
Frequently Asked Questions
How do I trigger a CSV file download in JavaScript?
const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" }); const url = URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; a.download = "export.csv"; a.click(); URL.revokeObjectURL(url). Add UTF-8 BOM for Excel compatibility: prepend "\uFEFF" to csvContent before creating Blob.
What is UTF-8 BOM and why does Excel need it for CSV?
BOM (Byte Order Mark) is a hidden character (\uFEFF) at the start of a UTF-8 file that signals to Excel: "this file uses UTF-8 encoding". Without BOM, Excel uses system default encoding (usually Windows-1252 / ANSI) and non-ASCII characters (Hindi, Gujarati, accented characters) appear as garbled text. Always add BOM when exporting CSV for Excel.
Can I schedule automatic JSON to CSV export?
Yes — automate with scripts: Node.js: use node-cron + json2csv to schedule daily exports. Python: schedule library + pandas for timed CSV generation. For cloud: AWS Lambda with EventBridge (CloudWatch Events) runs Node.js/Python on schedule. GitHub Actions workflow: run export script on schedule, commit CSV to repo or upload to S3.
How do I include calculated fields when exporting JSON to CSV?
Before conversion, add computed fields to your JSON: data.map(item => ({...item, fullName: item.firstName + " " + item.lastName, totalWithTax: item.price * 1.18})). Then convert the enriched JSON to CSV — computed fields appear as regular columns. The converter exports whatever is in the JSON — preprocess in JavaScript/Python first.