The Magic Codex

JSON to CSV Converter

Paste a JSON array of objects. Get a clean, properly escaped CSV back — preview the table, then download the .csv file.

Everything stays in your browser. Nothing is uploaded or stored.

How to convert JSON to CSV

Spreadsheets want rows and columns; JSON APIs hand you nested data. This tool bridges the gap: feed it an array of objects — the shape almost every API returns — and it flattens each object into one CSV row.

  1. Paste your JSON into the box above. It must be an array, like [{"name": "Ana", "age": 30}, …].
  2. Hit Convert to CSV. Column headers are built from every key found across all objects.
  3. Check the preview. Tricky cells — commas, quotes, line breaks — are escaped the standard way so Excel and Google Sheets parse them correctly.
  4. Download the .csv and open it in your spreadsheet app of choice.

How CSV escaping works

A cell that contains a comma, a double quote, or a line break gets wrapped in double quotes, and every quote inside it is doubled (" becomes ""). Cells with nested objects or arrays are stored as compact JSON text, so no data is ever silently dropped.

What JSON format does this tool accept?
An array of objects, like [{"name": "Ana", "age": 30}]. The keys become the CSV column headers, and every object is mapped onto the same columns.
How are commas and quotes in my data handled?
Any cell containing a comma, a quote, or a line break is wrapped in double quotes, and quotes inside the cell are doubled. That is the standard CSV escaping rule, so Excel and Google Sheets open the file correctly.
What happens to nested objects and arrays?
They are converted to compact JSON text and stored in a single cell. The original structure stays intact and re-parseable.
What if some objects are missing keys?
The header row is built from every key seen across all objects. Objects that lack a key get an empty cell in that column — nothing shifts out of place.
Is my data uploaded anywhere?
No. Parsing and conversion happen entirely in your browser. Your JSON never leaves your device.

More from the codex