JSON ↔ CSV Converter

Convert JSON to CSV and back — handles nested objects, runs in your browser.

Runs in your browserUpdated Built and maintained by Leon and Henrik

Convert JSON to CSV and CSV back to JSON in one place — nested objects flattened automatically, all in your browser. Free. No sign-up. Runs in your browser, nothing is uploaded.

JSON ↔ CSV Converter
Delimiter

CSV output

Your converted CSV will appear here.

Conversion happens locally in your browser. Your data is never uploaded.

Runs in your browser
Nothing is uploaded

Paste an array of JSON objects and you get a CSV with one row per object and one column per field, ready for Excel or Google Sheets. Switch the direction and paste a CSV with a header row to get a JSON array back. The output updates as you type; Download saves it as .csv or .json, and Swap direction feeds the result back in as the new input so you can check the round trip.

Not sure what your data will look like? Press Sample to load two nested records and see the flattening happen.

What happens to nested data

A CSV is a grid; JSON is a tree. The converter projects one onto the other like this:

[
  { "name": "Ada", "address": { "city": "London", "zip": "EC1" }, "tags": ["admin", "beta"] },
  { "name": "Linus", "address": { "city": "Portland" } }
]

becomes

name,address.city,address.zip,tags
Ada,London,EC1,"[""admin"",""beta""]"
Linus,Portland,,

Three things to notice:

  • Nested objects turn into dotted columns (address.city), however deep they go.
  • Arrays stay in one cell as JSON text. The quotes inside are doubled, which is correct CSV escaping, so the cell reads back exactly.
  • Every field gets a column, even if only one record has it. The header collects keys from all rows in first-seen order; records without a value leave the cell empty. (Some converters only look at the first record and silently drop the rest.)

A top-level single object becomes one row. If the array holds plain values rather than objects, they land in a single column called value.

Round trip: what comes back the same, and what does not

In your JSONIn the CSVBack in JSON
"name": "Ada"Ada"Ada"
"age": 363636 (number)
"zip": "01234"01234"01234" (stays a string)
"id": "42" (string)4242 (now a number)
"active": truetruetrue
"note": nullempty cellnull
"note": ""empty cellnull
"address": { "city": … }column address.citykey "address.city", not nested
"tags": ["a","b"]["a","b"] as textthe string "[\"a\",\"b\"]"

The practical upshot: JSON → CSV → JSON keeps every value, but nesting, arrays and the string-versus-number distinction for numeric-looking text are not restored. If you need the exact original structure back, keep the original JSON.

Opening the CSV in Excel without surprises

  • Everything lands in column A. Excel splits on the list separator of your system locale. In much of Europe that is a semicolon, so a comma file looks like one long column. Either set the delimiter to Semicolon before downloading, or import via Data → From Text/CSV and choose the delimiter there.
  • Accents and umlauts look garbled. The file is saved as UTF-8. Double-clicking a CSV in some Excel versions reads it in a legacy encoding instead. Importing via Data → From Text/CSV and picking UTF-8 fixes it.
  • Leading zeros vanish. The CSV still contains 01234, but Excel converts the column to numbers on opening. Import the column as Text to keep it.
  • Long IDs turn into 1.23457E+15. Excel keeps only 15 significant digits for numbers. Again, import that column as text.

Google Sheets handles most of this through File → Import, where you choose the separator and whether text should be converted to numbers.

When the CSV will not convert

  • A quote is opened and never closed. Everything after it would be garbled, so the converter stops and names the line. Look for a stray " in a text field.
  • A row has more or fewer fields than the header. The rows still convert; you get a warning with the line number so you can check it.
  • The first line is not a header. The first row always becomes the keys. If your file starts with data, add a header line first.

For messy JSON input, tidy and validate it in the JSON Formatter first. Need YAML rather than CSV? The JSON ↔ YAML Converter handles that pairing the same way.

Since customer exports, order histories and access logs are exactly the kind of data people convert, it is worth knowing that the parsing and writing happen in your browser and nothing is sent to a server. Online formatters that save pasted content on their servers have leaked exactly this kind of data before.

Frequently asked questions