JSON to CSV — Convert JSON to CSV Online
Convert JSON to CSV in your browser. Paste a JSON array or object, flatten nested fields into columns, then copy or download a spreadsheet-ready file. Need the other direction? Use the JSON ↔ CSV converter.
CSV output
How to Convert JSON to CSV
- Validate messy input in the JSON validator if needed.
- Paste a JSON array of objects, or upload a .json file.
- Pick a delimiter and decide whether to flatten nested fields.
- Copy the CSV or download it for Excel or Google Sheets.
About This JSON to CSV Tool
This page converts JSON to CSV in one direction — ideal when you already have API or config JSON and need a spreadsheet. For CSV back to JSON, use the JSON ↔ CSV converter. Create or clean the source file in the JSON editor, or check syntax with the JSON validator.
With flattening on, nested objects become columns such as address.city. Choose semicolon when your Excel locale treats comma as a decimal separator.
The shape of your JSON decides how good the CSV will be. CSV is a flat grid: every row has the same columns, and every cell holds one value. JSON is a tree. The conversion is therefore clean and lossless when the input is an array of flat objects — each object becomes a row, each key becomes a column — and gets progressively more awkward the further the data departs from that. A single object converts to one row. An array of primitives converts to a single column. Deeply nested structures need flattening, and arrays nested inside objects are the genuinely hard case, because a grid has no natural way to hold many values in one cell.
Flattening handles nesting by turning a path through the tree into a column name. An object such as {"address": {"city": "Berlin"}} becomes a column literally called address.city holding the value Berlin. This keeps every scalar value addressable and is what you want for a report or a spreadsheet pivot. The cost is column count: a payload with several levels of nesting can produce a very wide sheet, and keys that only appear on some records leave empty cells in the rest. Turn flattening off when you would rather keep a nested value intact as compact JSON inside a single cell — useful when you intend to read the file back programmatically rather than by eye.
Delimiter choice is about your spreadsheet's locale, not about the data. Comma is the default and is what Excel expects in the United States and the United Kingdom. Much of continental Europe uses comma as the decimal separator, so Excel there expects semicolon-separated values instead and will dump an entire comma-delimited row into one cell if you get it wrong. Tab is the safest option when values themselves contain commas and semicolons, and pipe is common in data-engineering pipelines. Google Sheets detects all four on import, so the delimiter matters most when the file is destined for desktop Excel.
A few quirks belong to the spreadsheet rather than to the converter, and knowing them saves a confusing afternoon. Excel will read an identifier such as 007 as the number 7 and drop the leading zeros, and it will turn a value like 3-4 into a date. Both happen on import, after a perfectly correct CSV has been written. The fix is to import rather than double-click — use Data, then From Text/CSV, and mark those columns as Text — or to prefix the value in your source data. Values containing the delimiter, a quotation mark, or a line break are quoted and escaped automatically here, so they survive the round trip.
Need the opposite direction, or a round trip? The JSON ↔ CSV converter reads CSV back into JSON as well. Fix a broken payload first in the JSON validator, or tidy the source in the JSON editor.
Frequently Asked Questions (FAQ)
How do I convert JSON to CSV online?
Paste a JSON array or object, choose a delimiter, and the CSV appears on the right. Copy it or download a .csv file for Excel or Google Sheets.
Does this tool flatten nested JSON?
Yes. With Flatten nested data on, address.city becomes its own column. Turn flattening off to keep nested values as compact JSON in one cell.
Can I convert CSV back to JSON?
This page is JSON to CSV only. Use the JSON ↔ CSV converter for the reverse direction and round-trip conversions.
What JSON shape works best for CSV?
An array of objects, where each object is a row. A single object is converted as one row.
Is my JSON uploaded when I convert to CSV?
No. Conversion runs in your browser. Invalid JSON is reported with a line number so you can fix it first.
Should I use a semicolon delimiter for Excel in Europe?
Often yes. Many European Excel locales expect semicolon-separated values because comma is the decimal separator. Pick Semicolon in the delimiter menu before you download.
What happens to arrays nested inside my objects?
They are the hard case, because a CSV cell holds one value and an array holds many. With flattening on, an array of scalars is written into a single cell; with it off, the nested value is kept as compact JSON in that cell. If each element really deserves its own row, reshape the JSON into a flat array of objects before converting.
Why did Excel turn my ID 007 into 7?
That is Excel's import behaviour, not a fault in the CSV — the file on disk still contains 007. Excel guesses types when you double-click a file, so leading zeros vanish and values like 3-4 become dates. Use Data, then From Text/CSV, and mark those columns as Text to keep them intact.
How are commas and quotes inside my values handled?
Automatically. Any value containing the delimiter, a double quote, or a line break is wrapped in quotes, and embedded quotes are doubled, which is the standard CSV escaping rule. The value survives the round trip unchanged in any spreadsheet or CSV parser that follows the convention.
Can I open the CSV in Google Sheets?
Yes. Google Sheets detects comma, semicolon, tab, and pipe on import, so any of the four delimiters works. Delimiter choice matters most for desktop Excel, which follows your system locale rather than inspecting the file.
What if some records have keys that others do not?
Every key found anywhere in the array becomes a column, and records missing that key get an empty cell. That is usually what you want for a report. If the gaps are unexpected, it is a sign the source data is less uniform than you assumed — worth checking before you build anything on the export.
Is there a size limit on the JSON I can convert?
Only your browser's memory. Conversion runs locally with no upload, so there is no server-side cap, but the whole document is held in the tab. Files in the low megabytes are comfortable; for very large exports a streaming tool such as jq or a short script is a better fit.
Tips for Clean JSON to CSV Exports
- Use semicolon if your Excel locale treats comma as a decimal separator.
- Keep IDs like 007 as text after import so spreadsheets do not drop zeros.
- Compare two exports with the text diff checker after a conversion.
- Reshape the JSON into a flat array of objects before converting. One object per row is the shape CSV was designed for, and everything else is a compromise.
- Import into Excel through Data, then From Text/CSV rather than double-clicking the file. That is where you get to mark ID columns as Text.
- Choose Tab when your values themselves contain commas and semicolons — it sidesteps the escaping question entirely.
- Turn flattening off when a nested value should stay intact for a machine to read back, and on when a person will read the sheet.
- Validate the payload in the JSON validator before a large export, so a single stray comma does not waste the run.