All tools

JSON to CSV Converter

JSON to CSV converts an array of JSON objects into a spreadsheet-ready CSV file that opens in Excel, Numbers or Google Sheets. Object keys become the header row and each object becomes a row, with quoting and escaping handled so commas and line breaks inside a value survive.

Runs entirely in your browser — nothing you enter is uploaded.

Data
Try one

About JSON to CSV conversion

The input needs to be an array of objects — the shape an API returns for a list. Keys are collected across every object to build the header, so records that are missing a field still line up in the right columns rather than shifting. Values containing a comma, a quote or a line break are wrapped in quotes and escaped, which is what stops a single address field from silently becoming three columns.

One guard is worth explaining, because it looks like a bug until you know why. A cell beginning =, +, - or @ is treated as a formula by Excel and Sheets, so a value from an untrusted source can execute the moment somebody opens the file. That is CSV injection, a real and well-documented attack. Such values are prefixed with an apostrophe, which spreadsheets read as "this is text" and do not display.

Common questions

Why do some cells have an apostrophe in front of them?
Because a cell starting with an equals sign, plus, minus or at sign is interpreted as a formula by Excel and Google Sheets, and a value that came from an untrusted source could run when the file is opened. Prefixing an apostrophe marks it as text. Spreadsheets do not display the apostrophe, and the value reads normally.
What JSON shape does it need?
An array of objects, which is what an API returns for a list of records. Each object becomes a row and its keys become columns. A single object on its own can be wrapped in square brackets to make a one-row table. Deeply nested objects have no natural representation in a flat CSV, so their values are serialised rather than expanded into columns.
What happens if some objects are missing a field?
The header is built from the keys found across all the objects, not just the first one, so a field that appears in only some records still gets a column. Records without it leave that cell empty rather than shifting their other values into the wrong columns, which is the failure mode of naive converters.
Will commas inside a value break the file?
No. Any value containing a comma, a double quote or a line break is wrapped in quotes, and embedded quotes are doubled, following the standard CSV convention. That is what allows an address or a comment field with punctuation in it to survive as a single cell.