Skip to main content
7BBusyBoss

JSON to CSV / CSV to JSON Converter

Convert a JSON array to CSV and back, with RFC 4180 quoting, a column for every key seen, and nested values serialised into one cell.

No limitsZero data leaksSuper fast
Output appears here...

You're on 7BusyBoss — 300+ free tools that run instantly in your browser. No signup, nothing uploaded.

Browse all Code Formatters
About this tool

JSON is a tree, CSV is a rectangle

JSON nests: objects inside objects, arrays of any length, values that are themselves structures. CSV is rows and columns and nothing else — no nesting, no types.

So the conversion is only lossless when the JSON already happens to be rectangular: an array of objects with the same keys, no nested values and no arrays. Anything else has to be compromised, and knowing which compromise you are getting is what stops the data being quietly mangled.

Nested objects get serialised into a cell

A field whose value is an object cannot occupy one cell as structure. Given {"customer": {"name": "Alice"}}, this converter writes the nested object back out as a JSON string and puts that string in a single cell.

The data is all there. But a spreadsheet cannot do anything with it, and converting that CSV back to JSON yields a string where an object used to be. The characters survive; the structure does not.

Arrays of different lengths get the same treatment

One record with three tags and the next with none cannot become a fixed set of columns. The whole array is serialised into one cell, which is readable by a program that parses JSON and useless to a human scanning a sheet.

Ragged keys become a union

If some objects carry a phone field and others do not, the header row is the union of every key seen and the rows that lacked it get an empty cell.

That empty cell is the problem on the way back. It arrives as an empty string, and nothing distinguishes "this record had no phone number" from "this record had a phone number recorded as blank". Two different facts, one representation.

Types vanish entirely

This is the one that surprises people, because it is invisible. CSV has no types at all. Given {"active": true, "count": 42, "note": null} you get the text true, the text 42, and an empty cell.

Convert back and you have {"active": "true", "count": "42", "note": ""} — three strings. Every one of those values is now a different type than it started as, and no amount of care in the conversion can recover the information, because the information was never written down. A JSON to CSV to JSON round trip does not return what you put in.

Quoting, and the one rule worth knowing

Standard RFC 4180 rules. Comma as delimiter; any field containing a comma, a double quote or a line break is wrapped in quotes; quotes inside a quoted field are doubled, so hello "world" is written "hello ""world""". Line breaks inside quoted fields survive, so multi-line values are safe.

The rule that catches parsers out: a quote only opens a quoted section at the start of a field. Mid-field it is an ordinary character, which is why a cell reading Pipe 5" is perfectly legal and does not swallow the rest of the row.

Which direction to go

Convert to CSV when the destination is a spreadsheet or a person. Keep JSON when the destination is another program, because it carries both structure and type.

And if you must convert, flatten deliberately beforehand rather than letting a converter decide for you — a customer.name column you designed beats a cell full of serialised JSON. Everything runs in your browser and nothing is uploaded. To look at the structure before deciding, use the JSON formatter.

How to use the JSON ↔ CSV Converter

Takes about a minute. No signup, no download, your data stays in your browser.

  1. 1
    Open the tool. Scroll up to the JSON ↔ CSV Converter above — it loads instantly in your browser, no install needed.
  2. 2
    Enter your values. The fields come pre-filled with realistic defaults so you can see how it works — replace them with your own numbers.
  3. 3
    Read the result. The output updates instantly. Copy or share it — nothing is uploaded to a server, everything stays on your device.

Frequently asked questions

Common questions about the JSON ↔ CSV Converter.

What happens to nested objects?

They are serialised back into a JSON string and placed in a single cell. The characters are all preserved, but a spreadsheet cannot work with them and converting back to JSON gives you a string where an object used to be. Flatten the structure yourself first if the destination needs real columns.

Why does a round trip not give me my data back?

Because CSV records no types. A boolean true becomes the text true, a number becomes a string of digits, and a null becomes an empty cell. Converting back makes all of them strings. The information was never written into the file, so nothing in the conversion can recover it.

What if my objects do not all have the same keys?

The header row becomes the union of every key seen, and rows missing a field get an empty cell. Worth knowing that this loses a distinction on the way back: an empty cell cannot tell you whether the field was absent from the original object or present and empty.

How are commas and quotes inside values handled?

By RFC 4180: a field containing a comma, a double quote or a newline is wrapped in quotes, and quotes inside a quoted field are doubled. So hello "world" is written with the inner quotes doubled. Fields with no special characters are left bare.

Can a value contain a line break?

Yes, as long as it is inside a quoted field, which the parser handles. A quote is only special at the start of a field under RFC 4180 — mid-field it is just a character — so a value like 5" inches is fine and will not run into the next row.

Is my data uploaded?

No, the conversion runs in your browser and nothing is sent to a server. That is worth knowing here because the JSON people convert is frequently an API response or a database export containing real customer records.

Community rating

Discussion (0)

No comments yet. Start the discussion.