What JSON to CSV conversion actually handles
JSON is hierarchical. CSV is flat. Converting JSON to CSV means deciding what to do with nested objects, what to do with arrays, and which delimiter makes the output compatible with the spreadsheet or pipeline tool you are about to paste it into.
Nested objects become dot-notation columns. A JSON object {"user": {"name": "Ana", "age": 33}} becomes CSV columns user.name,user.age with values Ana,33 in the same row. Without flattening, the user column would hold the string [object Object] and the rest of the hierarchy would be lost.
Arrays present three choices. You can join array items into one cell with a separator like |, split each array item into a new row and repeat the parent fields, or stringify the array into a JSON string inside a single CSV cell. The right choice depends on what you are importing into. Excel users usually want split rows. Database imports usually want a join.
Delimiters matter because CSV stands for comma-separated values but many regions and platforms expect semicolons, and tab-delimited files avoid escaping problems when commas appear inside your data. The converter lets you pick comma, semicolon, tab, or pipe.
The reverse mode reads CSV and converts it back into JSON. You pick whether the first row is headers, whether dot-notation columns should nest back into objects, and whether to output an array of objects or a single object with row keys.
How to use this JSON to CSV converter
- Paste JSON into JSON or CSV input, or drop in a URL if your JSON lives at an API endpoint and we fetch it for you.
- Set Mode to JSON → CSV or CSV → JSON.
- Pick your Delimiter. Comma is the default. Switch to semicolon if you are shipping to Excel on a European locale, tab if your JSON has commas in string values, or pipe if you are piping the output into a Unix script.
- Toggle Flatten nested keys with dot notation on if your JSON has more than one level of nesting. Turn it off if you want nested objects stringified into single cells instead.
- Hit Convert. You see a preview table showing the first 20 rows and every column. Check that the flattening and array handling match your expectations.
- Click Download CSV to save the file, or copy the output and paste it directly into Google Sheets, Excel, or your database import tool.
Try pasting this JSON:
[
{"product": "Widget A", "sales": {"Q1": 1200, "Q2": 1450}, "tags": ["new", "sale"]},
{"product": "Widget B", "sales": {"Q1": 980, "Q2": 1100}, "tags": ["featured"]}
]
With flattening on and delimiter set to comma, the output is:
product,sales.Q1,sales.Q2,tags
Widget A,1200,1450,new|sale
Widget B,980,1100,featured
Without flattening, the sales column shows [object Object] and you lose the quarterly breakdown. The array-join default uses | as separator. Switch to split-rows mode and you get four rows: one per tag per product.
Why JSON to CSV conversion matters for data workflows
Flat files are the universal interchange format. JSON is the output format of every modern API, analytics dashboard, and webhook. If your workflow involves taking data from one system and putting it into another, you will convert JSON to CSV at least once a week.
API exports. Most REST APIs return JSON by default. Google Analytics Data API, Stripe reporting, GitHub releases, Airtable exports - all JSON. Loading that data into Power BI, Tableau, or a SQL database is faster when it arrives as CSV. You can automate the conversion, but checking the output manually first catches schema surprises before they become pipeline errors.
Data transformation pipelines. ETL workflows often split into a fetch stage that pulls JSON and a load stage that expects CSV. Flattening nested JSON in the browser before the load saves writing and maintaining a transformation script. For one-off migrations or exploratory analysis, this converter finishes the job in under a minute.
Spreadsheet imports. Analysts who do not write code can still import API data if they have a way to turn JSON into CSV. Google Sheets and Excel both handle CSV paste and file import. Neither handles raw JSON unless you write a script. This tool closes the gap.
The delimiter choice prevents silent data corruption. Comma-delimited CSV breaks when a text field contains a comma unless every value is quoted and the quote character is escaped. Tab and semicolon delimiters sidestep that problem in most datasets. If your JSON includes addresses, product descriptions, or user-generated text, switch to tab.
Nested JSON flattening explained
Flat CSV has one row per record and one value per column. Nested JSON has objects inside objects. Flattening bridges the gap by turning each level of nesting into a column name with a dot separator.
A JSON object with three levels:
{
"company": "Acme Inc",
"contact": {
"person": "Jane Doe",
"email": {"work": "[email protected]", "personal": "[email protected]"}
}
}
becomes four CSV columns:
company,contact.person,contact.email.work,contact.email.personal
Acme Inc,Jane Doe,[email protected],[email protected]
Dot notation preserves the original hierarchy in a way that you can reverse. Some CSV-to-JSON converters recognize dot-notation columns and reconstruct the nested structure. If you leave flattening off, the converter stringifies nested objects into a single cell. That output is readable in a spreadsheet but not reversible back into structured data.
Arrays inside objects present a choice. If an object has "tags": ["new", "sale", "limited"] you can join the array into one cell as new|sale|limited, split into three rows with the other columns repeated, or stringify the array as a JSON fragment ["new","sale","limited"]. The join mode keeps one row per record and is the default. The split mode is useful when the array represents a one-to-many relationship. The stringify mode preserves type information but makes the CSV harder to query.
When your JSON includes mixed types - some records have an array where others have a single string - the converter normalizes them by wrapping single values into an array before applying the chosen array-handling rule. That prevents missing columns and keeps the CSV schema consistent.
Common mistakes
- Pasting a JSON fragment instead of a complete structure. The converter expects valid JSON: either an array of objects
[{…}, {…}]or a single object{…}. If you paste a truncated API response or a JSON chunk without closing braces, the parser throws an error. Copy the full response. - Leaving flattening on when you want readability over reversibility. Flattened column names like
meta.author.profile.urlare hard to scan in a spreadsheet. If you only need to read the data and will not convert it back to JSON, turn flattening off and accept stringified nested objects. - Using comma delimiter when your data has commas. Addresses, full names, and product descriptions almost always include commas. If your JSON contains any freeform text fields, switch to tab or pipe delimiter before you convert. Otherwise you will open the CSV in Excel and see columns shifted.
- Forgetting that large files exceed browser memory. This converter runs client-side. If your JSON is larger than 50 MB, the browser may freeze or crash. For datasets that size, use a command-line tool like
jqorcsvkitinstead. - Not previewing the output before downloading. The preview table shows the first 20 rows and every column. Check it. A wrong delimiter or a surprising array-split can double the row count and break downstream imports. Fixing it after download wastes time.
Advanced tips
- Validate your JSON first. If the converter throws a syntax error and you cannot spot the problem by eye, paste your JSON into a validator like
jsonlint.comor run it throughjq .on the command line. The error message will point to the line number. - Use the reverse mode to round-trip your data. Convert JSON to CSV, edit the CSV in your spreadsheet, then convert back to JSON. This workflow is faster than writing a script when you need to bulk-edit object properties.
- For deeply nested JSON, flatten first, then filter columns in your spreadsheet tool. A ten-level hierarchy produces dozens of dot-notation columns. Most of them are empty for most rows. Delete the empty columns after import.
- Save the preview as a screenshot before you download. If you are converting API data for a report or audit, the preview gives you evidence of the structure and row count. Stakeholders will ask "how many records did you import?" and the screenshot answers it.
- When working with arrays of primitives like
["red", "blue", "green"], the join mode with pipe delimiter is almost always the right choice. The split mode only makes sense when each array element needs its own row for database normalization.
Once you have your CSV, the next step is usually filtering or reshaping it. If your CSV includes a keyword column and you want to combine it with other lists, run it through our keyword combiner to generate permutations. If you are building URLs from the CSV rows, feed the relevant column into the slug generator to produce clean URL slugs in bulk. When your CSV is the result of an SEO audit and you want to validate the structure, use the SEO checklist to confirm that every field you need is present.