JSON to CSV Converter

Paste a JSON array, get a CSV. Nested objects are flattened into dot-notation columns. The delimiter, header row, quoting style and BOM are all configurable, and the resulting file is downloadable as a UTF-8 .csv that opens cleanly in Excel, Google Sheets or any analytics tool.

Open the JSON to CSV tool

What it does

The tool takes JSON as input — typically an array of objects, but other shapes are accepted — and emits CSV text on the right. The conversion happens entirely in your browser; nothing is uploaded. It is built around the most common ad-hoc use case: you copied a JSON response from a network panel or an API client, and you want to slice it in Excel.

Flattening is on by default. A bid response that looks like this:

[
  {"id": "1", "user": {"name": "Alice", "country": "UK"}, "price": 0.42},
  {"id": "2", "user": {"name": "Bob",   "country": "US"}, "price": 0.31}
]

becomes:

id,user.name,user.country,price
1,Alice,UK,0.42
2,Bob,US,0.31

You can switch flattening off if you prefer to see nested JSON as a literal string in a single cell, useful when you want to round-trip data through a spreadsheet without losing structure.

Who it's for

When to use it

Features

  • Handles nested objects. Dot-notation flattening: user.address.city becomes a single column called user.address.city.
  • Array-of-objects or object-of-arrays. Both shapes are accepted. For object-of-arrays (think Pandas-style: {"id": [1,2], "name": ["A","B"]}), the tool transposes into rows automatically.
  • Configurable delimiter. Comma, semicolon (preferred in many European locales because Excel uses comma as the decimal separator), or tab.
  • Header row toggle. Include or omit the first row of column names.
  • RFC 4180 escaping. Values containing the delimiter, embedded newlines, or quote characters are wrapped in double quotes and inner quotes are doubled.
  • UTF-8 BOM for Excel. Optional byte-order mark so Excel on Windows detects UTF-8 and renders Cyrillic, CJK and emoji characters correctly.
  • Downloadable. One click saves the result as a .csv file ready to open in Excel, Numbers, Sheets or any data tool.
  • Browser-only. No upload. The file you build never leaves your machine.

How it works

The tool does three things in order: parse, flatten, and serialise.

Parsing

The input is run through JSON.parse. If parsing fails, the tool reports the position of the error in the input panel rather than guessing. Common causes are trailing commas, unquoted keys, and single-quoted strings, none of which are valid JSON.

Flattening

For each object in the array, the tool walks the structure recursively. Nested keys are joined with a dot. Arrays of primitives are serialised as a JSON-encoded string in a single cell. Arrays of objects can either be expanded into multiple rows (cartesian product) or serialised as a JSON string per cell — your choice via a toggle.

The column set is the union of all flattened keys across all rows. Missing values are emitted as empty cells, not as the string "null", because most spreadsheet tools handle empty cells better.

Serialisation

The serialisation step follows RFC 4180 with a few practical relaxations:

SituationWhat the tool emits
Value contains the delimiterWrapped in double quotes
Value contains a newlineWrapped in double quotes; newline preserved inside quotes
Value contains a double quoteQuote doubled (" becomes ""), value wrapped in quotes
Value is a number or booleanWritten without quotes
Value is nullEmpty cell (configurable to literal null)
Line endingCRLF by default (Excel-friendly); LF if you prefer

The optional BOM is the three-byte sequence EF BB BF at the start of the file. This is what tells Excel on Windows to decode the file as UTF-8 rather than as the local code page. Without it, accented characters and Cyrillic text are often mangled into the infamous "Г°ВвВ" gibberish.

Common pitfalls

FAQ

How does it handle nested arrays?

Three options, picked by a toggle. Stringify writes the array as a JSON-encoded string in one cell. Explode creates one output row per element of the nested array (a cartesian product, so be careful with deeply nested data). Indexed columns creates columns like tags.0, tags.1, etc., useful when the array has a fixed small length.

Can I customise column order?

Yes. By default columns appear in the order keys are first seen in the input. You can also provide an explicit comma-separated list of column names in the "Column order" field — any keys not listed are appended after the listed ones, or dropped entirely if you tick the "strict" box.

Why are my Cyrillic (or Chinese, Greek, Hebrew, emoji) characters broken in Excel?

Almost always because Excel guessed the wrong encoding. Tick the "UTF-8 BOM" option in the tool and re-download. If you still see broken characters, use Excel's "From Text/CSV" import dialog rather than double-clicking the file — that dialog lets you pick the encoding explicitly.

What is the maximum input size?

There is no hard cap. Browsers comfortably handle JSON inputs of tens of megabytes. Past that point a CLI tool like jq or a small Python script will be faster and more memory-efficient.

Can I go the other way — CSV to JSON?

Not in this tool. A separate CSV-to-JSON converter is on the roadmap; in the meantime, opening the CSV in your spreadsheet of choice and exporting a JSON-friendly format from there is usually fastest.


Related tools

Related reading