JSON-zu-CSV-Konverter

An array of objects, an array of arrays, or a single object. Nested objects are flattened.
CSV

Columns are the union of every key, in the order they are first seen, so records with missing keys still line up. Fields containing the delimiter, a quote or a line break are quoted and inner quotes are doubled, per RFC 4180. Formula neutralisation prefixes a value with an apostrophe so a spreadsheet treats =SUM(A1) as text rather than running it.

Why convert JSON to CSV?

JSON is what APIs return. CSV is what spreadsheets open. Almost every conversion between the two starts with the same problem: someone has a JSON response from an API, an export from a database or a log file, and they need it in Excel, Google Sheets or a BI tool that has never heard of a nested object.

The conversion is straightforward when the JSON is a flat array of objects with identical keys. It stops being straightforward the moment records nest, keys differ between records, or the data contains commas, quotes and line breaks — which real data always does.

What this converter accepts

Paste any of these shapes into the box above:

  • An array of objects — the common API response shape. Each object becomes a row and each key becomes a column.
  • An array of arrays — already row-shaped, converted directly.
  • A single object — converted to one row.

Keys do not have to match across records. The converter collects every key it encounters and leaves cells blank where a record does not have that key, rather than dropping the column or failing.

Handling nested objects

Nesting is where most converters either give up or quietly mangle the data. You get two options here.

Flatten to dotted columns walks into nested objects and builds column names from the path. A record like {"user":{"name":"Ada","city":"London"}} becomes two columns, user.name and user.city. This is usually what you want, because the result is genuinely tabular and every value is filterable and sortable in a spreadsheet.

Keep as JSON in one cell leaves the nested structure serialised inside a single cell. Useful when the nested part is a payload you want to preserve intact rather than analyse — for example a settings blob you intend to feed back into another system.

The four options that decide whether Excel opens your file correctly

Delimiter

Comma is standard, but it is the wrong choice in much of Europe. In locales where the comma is the decimal separator, Excel expects semicolon-delimited files and will otherwise cram every row into a single column. Tab and pipe are the safest choices when your data itself contains punctuation.

Add a UTF-8 BOM

This is the fix for the single most common complaint about CSV files: accented characters and non-Latin scripts arriving as mojibake when opened in Excel. Excel does not assume UTF-8, and without a byte order mark it guesses — usually wrongly. If your data contains anything beyond plain ASCII, turn this on.

Quote every field

By default only fields that need quoting get it. Quoting everything produces a larger file but removes any ambiguity, which some strict parsers prefer.

Neutralise spreadsheet formulas

This one is a security control rather than a formatting preference, and it deserves its own section.

CSV injection, and why the formula option matters

If a cell value begins with =, +, - or @, Excel and Google Sheets interpret it as a formula rather than as text. That is a genuine attack path: an attacker who can get text into your database — through a signup form, a support ticket, a product review — can plant a value that executes when someone exports the data and opens it in a spreadsheet. The technique is well documented and is usually called CSV injection or formula injection.

Enabling Neutralise spreadsheet formulas prefixes those values so the spreadsheet treats them as plain text. If the JSON you are converting contains anything that originated from user input, leave this on. The cost is a harmless prefix on a handful of cells; the alternative is executing a stranger's formula on your machine.

How to convert JSON to CSV

  1. Paste your JSON into the input box.
  2. Choose a delimiter, and decide how nested values should be handled.
  3. Set the header row, quoting, BOM and formula options to suit where the file is going.
  4. Convert, then copy the result or download it as a .csv file.

Everything runs in your browser. The JSON is not uploaded, which matters when you are converting an API response that contains customer records, tokens or internal identifiers.

Frequently asked questions

How do I convert a JSON array to CSV?

Paste the array into the box above and convert. An array of objects is the ideal input — each object becomes a row, and the column headers are taken from the union of all keys found across the records.

What happens to nested arrays?

Nested structures are either flattened into dotted column names or preserved as JSON inside a single cell, depending on the option you choose. There is no universally correct answer, which is why it is a choice rather than a default.

Why does Excel show my accented characters as strange symbols?

Because Excel is not reading the file as UTF-8. Enable the BOM option and reopen the file; the characters will display correctly.

Why is my entire row landing in one column?

Your Excel locale expects a different delimiter than the one used in the file. Switch the delimiter to semicolon and try again, or use Excel's Text Import Wizard and set the delimiter manually.

Is there a file size limit?

There is no fixed limit, but conversion happens in your browser's memory, so very large files are constrained by your device rather than by a server quota. For multi-megabyte exports, a scripted conversion is usually a better fit than a browser tool.

Is my data sent anywhere?

No. The conversion runs entirely in JavaScript on your device. Nothing is uploaded, logged or stored.

Weitere Entwickler-Tools

Alle Entwickler-Tools