Convert JSON to CSV
Flatten any JSON
structure.
Free JSON to CSV converter. Handles nested objects, JSONL, keyed objects and arrays of arrays. Upload a .json file or paste JSON directly. Nested fields are flattened with dot notation automatically. Runs entirely in your browser.
Upload a file or paste JSON — three steps to a flat spreadsheet.
Drop a .json, .jsonl or .ndjson file — or paste your JSON directly into the text area. CSVShift detects the structure automatically: array of objects, JSONL, keyed object, array of arrays or a single flat object.
Set the flatten depth to control how many levels of nested objects are expanded into dot-notation columns. Choose how to handle array fields — join values, stringify, or take only the first element. Select your output delimiter.
Preview the first 10 rows of output to verify the column structure, then download the .csv file or copy it directly to your clipboard — ready to paste into Excel, Google Sheets or any database tool.
The converter works with all common JSON shapes automatically.
[
{ "name": "Alice", "age": 32 },
{ "name": "Bob", "age": 28 }
]
→ name, age columns
[{
"user": { "name": "Alice" },
"score": 95
}]
→ user.name, score columns
{"name":"Alice","age":32}
{"name":"Bob","age":28}
(one object per line)
→ name, age columns
{
"alice": { "age": 32 },
"bob": { "age": 28 }
}
→ _key, age columns
The structural mismatch between JSON and CSV explained.
CSV is a flat, rectangular format — every row has the same columns and every value is a plain string. JSON is a hierarchical format — values can be nested objects, arrays, typed numbers, booleans or null. Converting between them requires a strategy for handling the mismatch.
The main challenge is nested objects. When a JSON record has { "address": { "city": "Paris", "zip": "75001" } }, a naive CSV converter either drops the nested data or serializes it as a JSON string in one column. CSVShift instead flattens it into separate columns: address.city and address.zip — preserving all data in a format spreadsheets can use directly.
The second challenge is array fields. An array like { "tags": ["sales","europe"] } has no direct CSV equivalent. CSVShift gives you three options: join the values into one cell with a semicolon separator, take only the first element, or stringify the array as a JSON string. Choose based on how the receiving tool will process the data.
Common developer and analyst workflows where this conversion is essential.
REST APIs return JSON. When you need to analyze the data in Excel or Google Sheets — ad performance, sales pipeline, user analytics — you need to flatten the JSON response to CSV first. Paste the API response directly into CSVShift and download the spreadsheet.
MongoDB, Firestore and other NoSQL databases export data as JSON or JSONL. Converting to CSV lets you open the export in Excel, import it into a SQL database, or feed it into a BI tool like Power BI or Tableau.
Many ETL tools (Airbyte, Stitch, Fivetran) work with CSV as their flat file format. Converting a JSON export to CSV is the standard first step before loading into a data warehouse like BigQuery or Snowflake.
Machine learning pipelines often start with CSV as the input format for feature engineering. Converting a JSON dataset — from a labeling tool, an annotation platform or a scraping job — to CSV is the first preprocessing step before training.
What each setting does and when to change the default.
| Option | Values | When to use it |
|---|---|---|
| Flatten depth | 1 · 3 · 5 · Unlimited | 3 levels handles most real-world JSON. Use 1 level for shallow JSON where you only want top-level keys. Use Unlimited for deeply nested structures, but note it may produce many columns for complex data. Keys are joined with dots: a.b.c. |
| Array fields | Join · Stringify · First element | Join with semicolon puts all array values in one cell — readable in Excel. Stringify keeps the array as a JSON string — useful when you need to re-parse it later. First element extracts only the first item — use when arrays always have one meaningful value. |
| Header row | Include · Exclude | Include adds column names as the first row — standard for most uses. Exclude outputs data rows only — for appending to an existing CSV that already has headers. |
| Output delimiter | Comma · Tab · Semicolon | Comma for standard CSV. Tab when field values may contain commas (common in address or description fields). Semicolon for European locale Excel which uses semicolons as the list separator. |
Other free converters on CSVShift you might need.
JSON parsed entirely
in your browser. Always.
CSVShift processes every JSON to CSV conversion in JavaScript in your browser. Your file — or the JSON you paste — is never transmitted to any server. The entire parsing, flattening and serialization happens locally, in memory, on your device.
This matters especially for API responses and database exports that may contain sensitive or proprietary data. Nothing leaves your machine at any point during the conversion.
parent.child.key columns — all data preserved, none dropped.{"address": {"city": "Paris"}} becomes a column named address.city in the CSV. Set the flatten depth to control how many levels deep the tool expands.import pandas as pd; df = pd.json_normalize(data); df.to_csv('out.csv', index=False). With built-ins only: import json, csv; data = json.load(open('f.json')); w = csv.DictWriter(open('out.csv','w'), data[0].keys()); w.writeheader(); w.writerows(data). For a no-code solution, use CSVShift.