JSON to CSV Converter

Flatten a JSON array of objects into clean CSV.

Free JSON to CSV converter that turns an array of objects into RFC 4180 CSV with a header row, configurable delimiter and proper quote escaping. Runs entirely in your browser — nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What JSON shape does it expect?

An array of flat objects, for example [{"name":"Ada","city":"London"}]. The converter collects the union of all keys to build the header row and fills missing values with blanks.

Convert JSON to CSV in your browser

This tool flattens a JSON array of objects into clean CSV with a header row, ready for Excel, Google Sheets, a database import or a BI tool. It is built for developers exporting API responses and for anyone who needs spreadsheet-shaped data out of a JSON file without a script.

How it works

The tool parses your JSON, then scans every object to collect the union of all keys in first-seen order — that becomes the header row, so objects with differing fields still line up. Each object is then emitted as a row in header order, leaving a blank cell where a key is missing. Every field is escaped per the RFC 4180 standard: any value containing the delimiter, a double quote, or a line break is wrapped in quotes, and embedded quotes are doubled. Nested objects and arrays are serialised back to JSON text inside their cell.

Example

This JSON:

[
  { "name": "Ada", "city": "London" },
  { "name": "Bao", "city": "Hanoi", "role": "Designer" }
]

becomes (note the third column added from the second object, and the blank cell):

name,city,role
Ada,London,
Bao,Hanoi,Designer

The whole conversion happens locally in your browser — nothing is uploaded, so it is safe for sensitive exports.

Choosing the right delimiter

The default is a comma, which works with most tools and locales, but some situations call for a different separator:

  • Semicolon (;): Regional settings in Excel for European countries (Germany, France, the Netherlands, and others) use a semicolon as the list separator rather than a comma, because the comma is the decimal separator in those locales. If recipients are opening the file in a European Excel, use semicolon.
  • Tab (\t): TSV (tab-separated values) is often more robust than CSV when your string values might legitimately contain commas. Most spreadsheet apps import TSV without needing any special settings.
  • Pipe (|): Sometimes used in log formats or when both commas and tabs appear in the data.

Whatever delimiter you choose, the tool applies RFC 4180 quoting: any field that contains the delimiter, a newline, or a double quote is wrapped in double quotes, and double quotes inside the field are doubled.

Handling heterogeneous objects

When your JSON array contains objects with different keys, the tool collects the union of all keys across all objects and makes each one a column. Objects that do not have a particular key leave that column blank.

For example, given:

[
  { "id": 1, "name": "Alice", "role": "Admin" },
  { "id": 2, "name": "Bob" }
]

The output has three columns (id, name, role) and Bob’s row has a blank in the role column. The header comes from the first object to introduce each key, so the order follows the first-seen key order across the array.

Nested values become JSON strings

If any value in your array is itself an object or array, it is serialised back to a JSON string and placed in the cell (quoted if it contains the delimiter or a quote). For example:

[{ "user": { "name": "Alice" }, "tags": ["admin", "beta"] }]

produces a cell containing "{""name"":""Alice""}" for the user column — the inner JSON, with double quotes doubled per RFC 4180. To get flat columns for nested data, use the JSON Flattener first and then convert.

Opening CSV in Excel correctly

  • Windows: Double-clicking a .csv file opens it in Excel using your regional separator setting. If your regional setting is a semicolon, a comma-delimited file will appear in one column. Use the Data › From Text/CSV import wizard to choose the delimiter explicitly.
  • macOS: Numbers and Excel on Mac both handle comma-delimited files well from double-click.
  • Google Sheets: Import via File › Import and choose “Comma” or “Tab” depending on your delimiter.