JSON to CSV — convert JSON arrays to clean CSV
Paste a JSON array of objects and get spreadsheet-ready CSV instantly. Nested objects flatten into dot-notation columns, arrays join into a single cell, and objects with different keys line up under one union header with blanks where a value is missing. Pick your delimiter, quoting and line endings, preview the table, then copy or download a .csv that opens cleanly in Excel and Google Sheets.
Try an example
One click loads a realistic payload and converts it — a starting point for testing delimiters, flattening and quoting.
Your session
Snapshots and pinned setups live only in this tab's memory — close or reload the page and they are gone, so your JSON is never stored. The tools rail remembers only which tools you opened in this tab (session storage, no JSON or CSV data).
Conversion history
- No snapshots yet — convert valid JSON and it will appear here.
Favorite setups
- No pinned setups yet. Pin the current delimiter, flattening, quoting and line endings to reuse them in one click.
Favorite tools
- Pin a tool below and it will appear here.
Recently used
- No other tools used yet this session — tools you open from this page will appear here.
All encoding & conversion tools
How to convert JSON to CSV
- Paste your JSON into the box, or use Open .json file to load one from your device — the file is read locally, never uploaded. An array of objects works best; a single object converts to one row.
- The converter builds the CSV instantly: nested objects flatten into dot-notation columns, arrays join into one cell, and the column set is the union of all keys. Adjust the delimiter, quoting, flattening and line endings to taste.
- Check the table preview, then copy the CSV or download it as a .csv file ready for Excel, Google Sheets or any database import.
Worked example
This JSON array — the sample that Load sample inserts (651 characters pretty-printed with 2-space indent; shown condensed here):
converts with the default options to this CSV — 225 characters, 4 lines: a header plus 3 data rows, across 7 columns:
Three things to notice. The nested address object became two columns, address.city and address.country. Each skills array joined into one cell with ; . And Grace Hopper's role is wrapped in double quotes because it contains the comma delimiter — with the semicolon delimiter selected, that same value needs no quotes at all.
How each JSON shape is handled
| Input shape | What you get |
|---|---|
| Array of objects | One row per object. Columns are the union of all keys in first-seen order; a missing key leaves an empty cell in that row. |
| Single object | A header plus exactly one data row — handy for one API record or one config object. |
| Array of arrays | Written out row for row as-is, e.g. [[1,"a"],[2,"b"]] becomes 1,a and 2,b. No header is synthesized; the Header row setting does not apply. |
| Nested object value | Flattened by default: {"address":{"city":"London"}} becomes the column address.city, at any depth. Or keep it as compact JSON text in one cell. |
| Array value | Joined by default: ["math","code"] becomes math; code. Objects inside the array are written as compact JSON. Or keep the whole array as JSON text. |
| null value | An empty cell — the same as a missing key, which is how spreadsheets and CSV importers expect absent data. |
| Numbers & booleans | Written plainly: 36 stays 36, true stays true. Nothing is reformatted, rounded or localized. |
Missing keys line up automatically
Heterogeneous data is the norm in real API responses. Given [{"a":1,"b":2},{"a":3,"c":4}], the converter produces a header of a,b,c and rows 1,2, and 3,,4 — the second object's c value is never dropped just because the first object did not have that key, and the first row's empty c cell keeps every value in the right column.
Quoting rules (RFC 4180)
CSV looks simple until a value contains a comma. This converter follows the RFC 4180 rules that Excel, Google Sheets and database importers all agree on: quote a field only when it contains the delimiter, a double quote or a line break, and double any internal quotes — so say "hi" becomes "say ""hi""". Because quoting depends on the delimiter, switching to semicolon or tab output often removes most quotes entirely, which is one reason semicolon CSV is popular in locales that use commas as decimal separators.
Frequently asked questions
What JSON can this converter turn into CSV?
An array of objects is the ideal input — each object becomes a row and each key a column. A single object converts to a one-row CSV, an array of arrays is written out row for row, and an array mixing objects and plain values puts the plain values in a column named value. The column set is the union of every key in every object, in first-seen order, so no data is dropped when objects have different keys.
How are nested objects handled?
By default they are flattened with dot notation: an address object with city and country keys becomes the columns address.city and address.country. If you prefer, switch Nested objects to “Keep as JSON text” and each nested object is written into its cell as compact JSON instead.
What happens to arrays inside my JSON values?
By default the items are joined into a single cell with a semicolon and a space, so ["math","code"] becomes math; code. Objects inside an array are written as compact JSON text within the joined cell. You can also switch Arrays in values to “Keep as JSON text” to keep the whole array as JSON in the cell.
What if some objects are missing keys that others have?
Nothing breaks and nothing is lost. The header contains every key found in any object, and a row that lacks a key simply gets an empty cell in that column. For example [{"a":1,"b":2},{"a":3,"c":4}] converts to a header of a,b,c with rows 1,2, and 3,,4.
How does the converter quote and escape fields?
It follows RFC 4180, the standard CSV rules: a field is wrapped in double quotes only when it contains the delimiter, a double quote, or a line break, and double quotes inside a field are doubled. So Admiral, US Navy becomes "Admiral, US Navy" with a comma delimiter — but stays unquoted with a semicolon delimiter, because the comma is no longer special. You can also choose Quote all fields.
How do I open the CSV in Excel without garbled characters?
Turn the Excel BOM option on: it adds the UTF-8 byte-order mark at the start of the downloaded file, which tells Excel to read the file as UTF-8 so accented and non-Latin characters display correctly. Pair it with CRLF line endings for the most Excel-native result. Leave the BOM off for files consumed by scripts and databases, which usually prefer plain UTF-8.
Is my JSON uploaded or stored?
No. Parsing and conversion happen entirely in your browser with JavaScript — nothing is uploaded, stored or tracked, so it is safe for API responses and exported data. Avoid pasting live secrets into any online tool as a general habit, but here nothing leaves your device.
Can I send this CSV straight to other tools?
Yes. Use the Send CSV to… bar under the preview: it carries the current CSV in the link to the CSV to JSON converter, the Base64 or URL encoder, or the Character Counter, and it can carry your original JSON to the JSON Formatter or Validator — so you can round-trip or encode the result without copying and pasting. Very long payloads are copied to your clipboard instead.
Does this page remember my JSON between visits?
No. Conversion history snapshots, pinned setups and the recently-used tools list live only in this tab's session memory and disappear when you close or reload the tab. Your JSON and CSV are never written to storage, uploaded or tracked — close the tab and they are gone.
What to do with your CSV next
A CSV file is usually a waypoint on the way to a spreadsheet, a database or another system. The Send CSV to… bar under the preview carries the current result into the next tool for you:
- Round-trip it back — send the CSV to CSV to JSON to confirm the columns and values survived the trip, or to reshape the data as JSON again.
- Check the source first — send your original JSON to the JSON Validator for a dedicated validity report, or the JSON Formatter to read it comfortably before converting.
- Encode it for transport — Base64 for embedding in headers, fixtures or data URIs, or the URL Encoder/Decoder when a small CSV has to travel inside a link.
- Keep a reference offline — download the cheat sheet from the tool above: RFC 4180 quoting rules, delimiter guidance, flattening notes and Excel tips, with your current columns and output included.
Working the other way? Export a spreadsheet as CSV and convert it with CSV to JSON, generate a test dataset with the Fake Data Generator, then chain the JSON back here to turn it into a spreadsheet-ready file.
Related encoding & conversion tools
About this tool
The JSON to CSV Converter is one of 33 free utilities in the Online Utilities Suite at dev.conversiontools.online. It uses a strict JSON parser written for this page, so invalid input is reported with the exact line and column instead of a vague failure, and its CSV writer follows RFC 4180 so the output opens correctly in Excel, Google Sheets, LibreOffice and database import tools. The reverse trip lives in the companion CSV to JSON converter. Every tool in the suite runs entirely in your browser, so results are instant and private even on large payloads.
Privacy
This page processes everything locally in your browser: no account, no uploads, and nothing you paste is stored or sent to a server. Files you open are read on your device only. Advertising on this site is served by Google AdSense, which may use cookies to personalize ads; you can opt out of personalized advertising in your Google ad settings.