APIs speak JSON, but spreadsheets, analysts, and business tools speak CSV. Every time you need to hand API data to someone who lives in Excel — a product manager reviewing user records, an accountant reconciling transactions, a marketer segmenting contacts — that JSON array has to become rows and columns.
Doing it by hand means deciding on column order, escaping commas in values, quoting fields that contain quotes, and keeping every row aligned. Miss one quoting rule and the spreadsheet silently shifts columns, corrupting the data in a way nobody notices until it matters.
This free JSON to CSV converter automates all of it: paste a JSON array of objects, and it produces properly quoted CSV with a header row, correct "" escaping, and CRLF line endings that Excel expects. Download the result as .csv or copy it straight into a spreadsheet. All processing is local, so API responses with personal data stay on your machine.
How to use the JSON to CSV converter
- Paste your JSON — an array of objects like
[{"name":"Alice","age":30}]. A single object works too. - Click “Convert to CSV” (or “Load sample” to see it in action).
- Check the summary — rows × columns converted, so you can sanity-check the shape.
- Download converted.csv or copy the CSV into Excel / Google Sheets.
- Need the reverse? Our CSV to JSON converter goes the other way.
Key features & benefits
- Automatic header row. Object keys become column headers; keys discovered in later objects are added as new columns.
- Correct quoting. Values containing commas, quotes, or line breaks are quoted and escaped per CSV rules — spreadsheets parse them perfectly.
- Nested objects handled. Objects or arrays inside a value are serialized as compact JSON text rather than
[object Object]. - Excel-friendly line endings. CRLF endings and UTF-8 output open cleanly in Excel, Sheets, and Numbers.
- Clear error messages. Invalid JSON or non-object arrays explain exactly what is wrong instead of producing garbage.
- Private conversion. Everything runs in your browser — API keys or personal data in the JSON never leave your device.
Preparing JSON for spreadsheet export
A little shaping before conversion saves a lot of cleanup afterwards.
Flatten what you can
Deeply nested objects become JSON-in-a-cell, which is honest but hard to analyze. If you control the API query, request a flat projection; if not, consider extracting the nested fields you need first. For inspecting structure before export, our JSON formatter makes nesting visible.
Watch mixed-type columns
If one object has "age": 30 and another has "age": "unknown", the column mixes numbers and text and spreadsheet formulas may misbehave. Normalize types upstream when you can, or filter afterwards.
Check dates and large numbers
Excel mangles ISO dates and 16-digit ids when left to guess formats — import via Data → From Text/CSV and set column types explicitly rather than double-clicking the file. Unix timestamps in your data? Decode them first with our Unix timestamp converter.
Frequently asked questions
What JSON shape does it expect?
An array of flat-ish objects: [{"a":1,"b":2},{"a":3,"b":4}]. A single object is wrapped automatically. Arrays of primitives or deeply irregular structures will produce an explanatory error rather than a broken file.
Why do some cells show JSON text?
Values that are themselves objects or arrays cannot fit a single CSV cell as plain text, so they are serialized as compact JSON strings. This preserves the data losslessly; use your spreadsheet’s JSON functions or a follow-up script to expand them if needed.
Will Excel open the downloaded file correctly?
Yes — the file uses UTF-8 with CRLF line endings and standard quoting, which Excel, Google Sheets, LibreOffice, and Numbers all parse. If Excel guesses a column type wrong (dates, long numbers), use the Text Import Wizard to set types explicitly.
How are missing fields handled?
Objects missing a key found elsewhere get an empty cell in that column — the grid stays rectangular and aligned. The header row is the union of all keys across all objects, in first-seen order.
Can I convert CSV back to JSON?
Yes, with our CSV to JSON converter — it handles quoted fields, embedded commas, and type inference, making the round trip reliable.
How It Works: Under the Hood
Conversion flattens hierarchical JSON into a two-dimensional table. Nested objects become dot-notated columns (user.address.city), arrays are either indexed (tags.0, tags.1) or joined with a delimiter, and the header row is the union of all keys across every record — because real-world JSON rarely has a uniform schema. Type coercion follows CSV rules: everything becomes text, so numbers, booleans, and nulls need explicit handling (empty string vs literal “null” matters downstream). Fields containing the delimiter, quotes, or newlines get RFC 4180 quoted (“a, b” stays one cell). The fundamental tension: JSON is a tree, CSV is a grid — deeply nested structures inevitably lose some fidelity, and the converter’s flattening strategy determines what survives.
Real-World Use Cases
- API to spreadsheet: pull a REST API’s JSON response, convert, and hand a client a clean Excel file instead of raw developer output.
- Analytics exports: marketing platforms export JSON event streams — flatten to CSV for pivot tables and charts in Excel/Sheets.
- NoSQL to SQL staging: MongoDB documents converted to CSV as an intermediate step before bulk-loading into Postgres or BigQuery.
- Log analysis: JSON application logs flattened so support teams can filter and sort in a spreadsheet without touching a terminal.
- Data journalism: government open-data APIs return JSON; reporters convert to CSV for analysis in familiar tools.
Advanced Tips
- Control flatten depth. Dot-notating 6 levels deep creates unreadable 80-character column names — flatten 2–3 levels and keep the rest as JSON strings in a “raw” column.
- Distinguish null from missing. A null email means “known empty”; a missing key means “unknown”. Map them differently (empty vs “N/A”) or your analysis lies.
- Mind the delimiter locale. European Excel expects semicolons, not commas. If your CSV opens as one column in Excel, it’s a delimiter mismatch, not broken data.
- Add a BOM for Excel. UTF-8 files with non-ASCII characters (names, addresses) show as mojibake in Excel unless saved with a byte-order mark — Google Sheets handles it fine either way.
Common Mistakes to Avoid
- Silently dropping nested arrays. A converter that keeps only the first array element loses data — check how arrays are handled before trusting the output.
- Assuming uniform schema. Record 1 has “phone”, record 400 has “phone_number” — the union header catches both as separate columns; normalize keys first or merge afterward.
- Delimiter collisions. Addresses like “Main St, Apt 4” split into two columns unless properly quoted — always verify quoted output, don’t eyeball it.
- Losing leading zeros. ZIP codes and phone numbers (“0301…”) become numbers in Excel and lose their zeros — import as text or prefix handling is required.
Why Nested Objects Land in Cells as JSON Text
Real API responses are rarely flat — and when this JSON to CSV converter meets a nested object or array inside a value, it keeps the data intact by writing it into the cell as JSON text rather than silently dropping it. That is the honest behavior: nothing is lost, but you will want to flatten deeply nested structures yourself before converting if you need every sub-field as its own column. Check the rows-by-columns summary after converting to confirm the shape looks right. If your JSON might be malformed, validate it first with the JSON formatter.
Validate First: Broken JSON Breaks the Conversion
The most common conversion failure is not the tool — it is the input: a trailing comma, a missing quote, or mismatched brackets copied from a log file. Before converting, make sure your JSON is an array of objects (a single object works too) with consistent keys, since missing fields shift how columns align. A quick pass through a validator catches these issues in seconds and saves you from debugging a mangled spreadsheet later. Need to go the other direction afterwards? The CSV to JSON converter reverses the process.
Frequently Asked Questions
Can I upload a JSON file instead of pasting?
Currently the tool works with pasted text — paste your JSON into the input box (or click “Load sample” to see the format) and convert from there.
Is my data sent to a server during conversion?
No. All processing happens locally in your browser, so API responses containing personal or sensitive data never leave your machine.
Will special characters like commas break my columns?
No. Values are properly quoted with correct escaping, so commas, quotes, and line breaks stay safely inside their own cells.