JSON to CSV Converter
Paste a JSON array and get a spreadsheet out. Nested objects become dotted columns, and the option Excel needs to read your text correctly is turned on.
How to use it
- Paste a JSON array of objects. A single object works too and becomes one row.
- Leave both boxes ticked unless you know you want otherwise.
- Download the file, or copy the text.
The byte mark, and why your names come out as gibberish without it
If you have ever opened a CSV in Excel and found
ģı where a name should be,
this is why. A CSV file carries no statement of what alphabet it is
written in. Excel on Windows, opening a file by double-click,
guesses the old regional encoding rather than UTF-8 — and
every character outside plain English breaks.
The fix is three invisible bytes at the very start of the file that say “this is UTF-8”. That is the tick box, and it is on by default because far more people open CSVs in Excel than anywhere else. Untick it if the file is going into a program that reads the mark literally and puts a stray character in your first column heading — some older importers do.
Nesting, and the honest answer about it
JSON holds objects inside objects. CSV is a flat grid. There is no
standard for bridging the two, so every tool invents something and
this one uses dots: order.total becomes a column, and
list items become tags.0, tags.1.
It is a convention, not a rule, so whoever reads the file needs to know it. Untick flattening and any nested value is written as JSON inside a single cell instead — uglier to read, but it survives the round trip without a convention.
Rows do not all have to match
The columns are every key that appears anywhere, in the order first
seen. A row missing a key gets an empty cell, and nothing is
dropped. In the example above only one order has a note, so the
note column exists and two cells are empty —
which is what a spreadsheet expects.
The quoting rules, followed properly
A field containing your separator, a quotation mark or a line break
is wrapped in quotes, and any quotation mark inside it is doubled.
That is what the CSV convention actually says, and it is why
Ravi, Jr in the example comes out as
"Ravi, Jr" rather than splitting into two
columns.
Frequently asked questions
Why is there a strange character in my first column heading?
The byte mark for Excel is being read literally by whatever opened the file. Untick that box and convert again. It is needed for Excel and unhelpful for some other importers.
My JSON is an object, not an array. Will it work?
Yes, it becomes a single row. If your data is wrapped - something like { "results": [ ... ] } - paste just the array part, or the whole object becomes one very wide row.
What happens to nested objects?
They become dotted columns: order.total, address.city. With flattening turned off, the nested value is written as JSON text inside one cell instead, which keeps it intact for a trip back to JSON later.
Should I use a comma or a semicolon?
Comma, unless the file is for Excel on a computer set to a region that uses a comma as the decimal point - much of Europe and South America. There Excel expects semicolons and will put everything in one column otherwise.
Are the numbers changed in any way?
No. Numbers are written exactly as they appear in the JSON, with no rounding and no thousands separators. What a spreadsheet then decides to display is its own business, and it may well show a long number in scientific notation.
Is my text sent anywhere?
No. Everything happens in JavaScript inside your own browser. Nothing is uploaded and nothing is saved - close the tab and it is gone.