Skip to content

JSON to CSV Converter

Paste a JSON array and get a CSV file ready for Excel or Google Sheets, with nested data flattened into columns.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is JSON to CSV Converter?

APIs return JSON, but analysts and spreadsheets work with CSV. This tool accepts an array of objects, an array of arrays, a single object or JSON Lines, and builds one row per record. Column names are the union of all keys in first-seen order, so records with different fields still line up.

Nested objects are flattened with dot notation (address.city), and arrays can be kept as JSON text, joined with commas or expanded into indexed columns (tags.0, tags.1). Fields are quoted only when needed, and you can choose the delimiter and line endings.

How does it work?

  1. Paste the JSON, or load a .json file with the open-file button.
  2. Choose the delimiter, whether to include a header row and whether nested objects are flattened.
  3. Select how arrays are written: JSON text, joined values or expanded columns.
  4. Copy or download data.csv. Tick the formula-injection option if the file will be opened in Excel by other people.

Common use cases

  • Exporting an API response to a spreadsheet for a colleague who does not use JSON.
  • Turning a MongoDB or Elasticsearch result into a flat table for analysis.
  • Building a CSV import file for a CRM or e-commerce platform from JSON data.
  • Checking how nested data would look once flattened before designing a database import.

Examples

Try this input in the tool above:

Input
[
  {"id": 1, "name": "Alice", "address": {"city": "Paris", "zip": "75001"}, "tags": ["admin", "dev"]},
  {"id": 2, "name": "Bob, Jr.", "address": {"city": "Lyon"}, "active": true}
]
Output
id,name,address.city,address.zip,tags,active
1,Alice,Paris,75001,"[""admin"",""dev""]",
2,"Bob, Jr.",Lyon,,,true

Privacy

JSON to CSV Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

CSV is flat, so deeply nested structures are flattened or serialized as JSON text. Records with thousands of different keys produce very wide files (limited to 20,000 columns).

Frequently asked questions

What is CSV injection and should I enable the protection?

Spreadsheet programs interpret cells starting with = + - or @ as formulas. Enabling the option adds a leading apostrophe to such text so a crafted value cannot run a formula. Real JSON numbers are left unchanged.

How are records with different keys handled?

The header is the union of all keys in the order they first appear. A record that lacks a key simply gets an empty cell in that column.

Can I convert one big object instead of an array?

Yes. A single object becomes one row, and nested objects become dotted columns. JSON Lines (one object per line) is also accepted.

More tools in JSON & Data →