How to Convert JSON to CSV
APIs speak JSON; analysts speak spreadsheets. Somewhere between the two there is a conversion, and doing it by hand means writing commas and quotes you will get wrong. A proper converter reads your JSON structure, builds a column for every key and escapes every value — the whole job in one click.
What JSON shapes convert cleanly
CSV is a table: rows, columns, one header line. JSON converts well when it already resembles a table.
[
{ "name": "Compressor", "category": "Images", "free": true },
{ "name": "Merger", "category": "PDF", "free": true }
]- An array of objects — the ideal case: one row per object.
- A single object — becomes a one-row table.
- Objects with different keys — still works: the converter unions all keys into columns and leaves missing values empty.
- An array of numbers or strings — not a table, so this is rejected rather than guessed at.
Nested structures are the edge case: a value that is itself an object or array gets written into its cell as JSON text. That is faithful, but rarely what a spreadsheet user wants — flatten the data before converting if you need columns per field.
Convert JSON to CSV step by step
Open the converter
Load the JSON to CSV tool. Your data stays in the browser.
Paste the JSON
Drop in the array (or object). If it might be malformed, format and validate it first with the JSON Formatter.
Convert
Press convert. The tool reports how many rows and columns it produced, so you can sanity-check the count immediately.
Copy or download
Copy the CSV to the clipboard or download it as a UTF-8 data.csv file, ready for any spreadsheet.
How columns and quoting work
For the example above the converter produces:
name,category,free
Compressor,Images,true
Merger,PDF,trueTwo rules make the output trustworthy:
- Columns come from keys. Every key found on any object becomes a column, in order of first appearance; an object missing a key simply leaves that cell blank.
- Values are quoted when they must be. Any cell containing a comma, a quote or a line break is wrapped in double quotes with inner quotes doubled — the CSV standard rule, and exactly what spreadsheets expect when they import the file.
- Numbers and booleans are written plainly; null or missing values become empty cells.
Getting the CSV into a spreadsheet safely
- Download the CSV, then — before double-clicking anything — read How to convert CSV to Excel without losing data if your columns contain identifiers, phone numbers or codes.
- For pure analysis, import the CSV as text (the import dialog lets you set the column types) rather than letting the spreadsheet coerce on open.
- Keep the JSON original. The CSV is a derived export — regenerate it whenever the data changes instead of editing both by hand.
Common mistakes to avoid
- Converting deeply nested JSON and expecting tidy columns. Flatten objects into top-level keys first — or accept JSON-in-a-cell.
- Ignoring the row and column count after conversion. If you pasted 500 records but see 49, something truncated the input.
- Hand-editing the CSV to fix quoting. Let the converter escape; manual quotes are the fastest route to a corrupted file.
- Treating the export as the master. Edits belong in the source data — the CSV should stay a build artefact.
- Feeding the CSV straight into Excel for identifier columns. Convert to .xlsx safely with the CSV to Excel tool instead.
The short version
Paste an array of objects, convert, check the counts, download. Columns are built from keys, quoting follows the standard, and your data lands in the spreadsheet exactly as it was in the JSON — provided identifiers were written as strings to begin with.
Tools for this guide
Related guides
How to Convert CSV to Excel Without Losing Data
Opening a CSV directly in Excel can silently mangle phone numbers, IDs and dates. Convert it properly instead and keep every value exactly as written.
How to Format JSON Online: A Beginner's Guide
Minified JSON is unreadable. Format it with proper indentation, validate it in the same click, and learn the five errors that break almost every JSON file.
How to Decode Base64 Safely
Base64 is everywhere — emails, tokens, data URIs. Learn what it does and does not do, how to spot it, and how to decode it safely in one step.
Put the guide into practice
Every guide here maps to a free ToolPilot tool you can use right now — no installation and no account required.
Browse all tools