Home Developer Tools JSON to CSV

JSON to CSV Converter - Flatten Nested Data

Paste or upload JSON - nested objects and arrays are flattened automatically using dot notation. Pick exactly which columns to export with the column mapper, preview the result as a live table, then download as CSV.

Always Free Auto-flatten nested Column mapper Runs in browser
Flatten nested · Pick columns · Custom delimiter
Nested objects flattened automatically with dot notation
Pick exactly which columns to export
Clear error messages for invalid JSON
User list Nested objects Arrays of items Inconsistent fields
Objects: -
Flatten nested objects
Include header row
JSON input
0 bytes
Drop JSON file here
CSV output
-

CSV output appears here

Paste JSON or load a sample to begin

Column mapper - choose fields to export
Live table preview

Real JSON has nested data.
Most converters break on it.

This one flattens nested objects and arrays intelligently, lets you pick exactly which columns matter, and shows you the result before you download.

Smart flattening

Nested objects like address.city become real CSV columns automatically - toggle on/off to compare flat vs. nested output.

dot-notation columns

Column mapper

Every field across all your objects is discovered and listed - untick any column you don't need before exporting.

pick exactly what you need

Array handling

Arrays of values join into one cell with a separator. Arrays of objects flatten into indexed columns like items.0.name.

arrays don't break it

Clear error messages

Invalid JSON shows the exact problem in plain English - no cryptic "Unexpected token" with no context.

plain-English errors

Live table preview

See your CSV rendered as a real table before downloading - verify columns and data line up correctly.

verify before export

Custom delimiter

Switch to semicolon for European Excel locales, or tab/pipe for other systems - all from a dropdown.

4 delimiters

Convert JSON to CSV in 3 steps

Handles flat and deeply nested JSON arrays.

1

Paste or upload JSON

Paste a JSON array of objects, or drag and drop a .json file. Invalid JSON is flagged immediately with a clear explanation.

2

Map your columns

Nested fields are flattened automatically. Use the column mapper to untick anything you don't want in the final CSV.

3

Preview & download

Check the live table preview, then copy the CSV or download it - ready for Excel, Google Sheets, or a database import.

JSON to CSV - handling the hard parts

Converting a flat JSON array of simple objects to CSV is trivial - each key becomes a column, each object becomes a row. The hard part is everything else: nested objects, arrays, inconsistent fields across objects, and special characters that need escaping. This is where most free converters fall apart.

Flattening nested objects

Consider this JSON:

{"name": "Rahul", "address": {"city": "Delhi", "zip": "110001"}}

CSV has no concept of nesting - every cell is a flat value. The standard approach is to flatten nested keys using dot notation, turning the address object into two columns: address.city and address.zip. This tool does this automatically and lets you toggle it off if you'd rather see nested objects as raw JSON strings in a single cell.

Handling arrays

Arrays present a choice. A simple array of strings like "tags": ["new", "sale"] can be joined into one cell as new; sale. But an array of objects - like a list of order items - doesn't fit neatly into one cell. This tool flattens array-of-object fields into indexed columns: items.0.name, items.0.price, items.1.name, and so on, up to the maximum array length found across all objects.

Inconsistent fields across objects

Real-world JSON often has objects with different shapes - some have an email field, others don't; some have extra metadata. This tool scans every object in your array, builds a union of all fields found, and fills in empty cells for objects missing a particular field. The column mapper shows you this full union before you export, so nothing is silently dropped.

Why use semicolon instead of comma? In many European locales, Excel is configured to use a comma as the decimal separator (e.g. 3,14 for pi) and therefore expects semicolons to separate CSV fields. If your CSV opens with all data crammed into one column in Excel, switch the delimiter to semicolon and re-export.
JSON structureCSV result
{"name":"Rahul"}One column: name
{"address":{"city":"Delhi"}}One column: address.city
{"tags":["a","b"]}One column: tags → "a; b"
{"items":[{"sku":"A1"},{"sku":"B2"}]}Columns: items.0.sku, items.1.sku
Objects with different keysUnion of all keys, empty cells for missing

Excel & Sheets

Convert an API response into a CSV you can open directly in Excel or Google Sheets for analysis.

Database exports

Turn a MongoDB or Firebase export into a flat CSV for import into a relational database.

Reporting

Convert nested analytics or log data into spreadsheet-friendly rows for pivot tables and charts.

CRM imports

Flatten customer records with nested contact info into the flat CSV format CRM tools expect.

Data audits

Use the column mapper to see every field across hundreds of records and decide what to keep.

Round-trip testing

Convert CSV → JSON → CSV to verify your data transformations preserve everything correctly.

JSON to CSV questions,
answered.

Everything about flattening nested JSON and exporting clean CSV.

Ask a question
Paste a JSON array of objects into the input box, or upload a .json file. The tool flattens nested objects, lets you choose which columns to include using the column mapper, and generates CSV output you can copy or download.
Nested objects are flattened using dot notation. A field like address.city in the JSON becomes a column named address.city in the CSV. This happens automatically and can be reviewed in the column mapper before exporting. Toggle "Flatten nested objects" off to keep nested data as a raw JSON string instead.
Arrays of simple values (strings or numbers) are joined into a single cell using a semicolon separator. Arrays of objects are flattened into indexed columns, such as items.0.name and items.1.name, based on the longest array found across your data.
Yes. The column mapper lists every field discovered across all objects in your JSON, including flattened nested fields. Untick any column to exclude it from the CSV output - the live preview and download update instantly.
Comma is the default, but you can switch to semicolon, tab, or pipe using the delimiter dropdown - useful for regions where Excel expects semicolons due to comma being used as a decimal separator.
The tool scans all objects in the array and builds a union of every field found. Objects missing a particular field will simply have an empty cell for that column in the CSV - nothing is dropped or causes an error. Try the "Inconsistent fields" sample to see this in action.
No. All conversion happens locally in your browser using JavaScript. Your JSON data never leaves your device and is never stored anywhere.