Guides

Converting JSON to CSV without uploading it

· 5 min read

JSON is a tree and CSV is a grid, so every conversion between them is a decision about how to flatten the tree. Most of the surprises come from that, not from the tool.

The flattening problem

An array of flat objects converts cleanly: each object is a row, each key a column. The trouble starts when a value is itself an object, when different objects carry different keys, or when an array appears inside a record. There is no single right answer, only a chosen one, and knowing which was chosen is what lets you trust the output.

Nested objects become dotted column names, so an address object holding a city becomes an address.city column. Records with different keys produce a union of columns, with empty cells where a record had nothing. That is usually what you want for a spreadsheet, and it is worth checking rather than assuming.

What survives and what does not

Open the result and look at one row you already know the answer for. It takes fifteen seconds and catches the cases above immediately.

Why do it locally

The same reason as everything else here: the JSON you are converting is usually an export from a real system, which means real records about real people. Converting it in the browser means it never becomes someone else's log entry. Load the page, go offline, and the conversion still works.

Frequently asked questions

Does it handle nested JSON?

Yes, by flattening nested objects into dotted column names. Deeply nested arrays are the case worth checking by hand, since a grid cannot represent them faithfully.

What happens to missing keys?

Columns are the union of all keys found, and records missing a key get an empty cell.

Is my data uploaded?

No. The conversion runs in your browser tab.