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.
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
- Data analysts who routinely pull API responses and need to crunch them in Excel, Sheets or Tableau. JSON is the lingua franca of APIs; CSV is the lingua franca of spreadsheets. Something has to bridge the two.
- Ad-tech and product engineers looking at sampled bid logs, event streams or campaign exports as flat tables.
- Anyone preparing data for a non-engineer. CSV is the safe handoff format: every business application reads it, and there is no parsing surprise.
- Support and customer-success teams who receive JSON payloads from logs and want a readable view to share with a customer.
When to use it
- Analysing API logs in Excel. Drop a captured response set into the tool, download the CSV, and you have a sortable, filterable table without writing a single line of code.
- Sharing data with non-engineers. Product managers, marketers and finance people consume spreadsheets, not JSON. The conversion is one of the most useful five-second tasks in a typical week.
- Building reports. Many BI tools have a "paste CSV" upload path that is faster than connecting a database. A quick JSON-to-CSV round trip lets you skip the integration step for one-off exploration.
- Diffing two API responses. Converting both to CSV makes a row-by-row diff in a spreadsheet trivial. (For text-level diffs, see our text diff.)
- Quick sanity checks. Sometimes you just want to count distinct values or pivot by one field; that is faster in a spreadsheet than in the source JSON.
Features
- Handles nested objects. Dot-notation flattening:
user.address.citybecomes a single column calleduser.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
.csvfile 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:
| Situation | What the tool emits |
|---|---|
| Value contains the delimiter | Wrapped in double quotes |
| Value contains a newline | Wrapped in double quotes; newline preserved inside quotes |
| Value contains a double quote | Quote doubled (" becomes ""), value wrapped in quotes |
| Value is a number or boolean | Written without quotes |
Value is null | Empty cell (configurable to literal null) |
| Line ending | CRLF 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
- Commas in values. The single most common failure mode of hand-written CSV. The tool always quotes values that contain the delimiter; if you change the delimiter (say, to semicolon) the quoting follows.
- Embedded newlines. Multi-line text in a field is legal in CSV provided the value is quoted. Many naive tools break here. This one does not. Some downstream tools still struggle: if your consumer is one of them, replace newlines with
\nliterals before exporting. - Character encoding for Excel. Excel on Windows defaults to the system code page when opening a CSV directly. The UTF-8 BOM forces it to use UTF-8. On Mac the situation is better but the BOM does no harm.
- Numbers as strings. If your JSON has string-typed numbers like
"price": "0.42", the CSV will also contain string-typed numbers. The tool does not coerce — Excel will, but Google Sheets sometimes will not. Be explicit in your source data when this matters. - Date formats. ISO 8601 strings (
2026-06-30T12:34:56Z) survive cleanly. Localised date strings from your backend may be reinterpreted by Excel based on regional settings.
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
- JSON beautifier and validator — clean up your JSON before converting.
- Escape and unescape — useful when JSON values contain nested escaped strings.
- Prefix and suffix tool — post-process individual columns after the conversion.