/tools/json-to-csv
Streaming JSON to CSV Converter
Convert a JSON array of objects to CSV. Paste JSON or choose a file, then review the result before saving.
JSON source
Conversion result
No conversion has run.
Columns and rows will appear after the validation pass.
How the two-pass conversion works
- Pass 1
- Strict UTF-8 and JSON validation; locate the exact array; discover first-seen columns.
- Pass 2
- Re-scan records to prepare the result. Large downloads re-read the source and stream directly to the chosen file.
Convert JSON to CSV for Excel
Turn a JSON export into a spreadsheet while keeping identifiers and names readable. Try this synthetic array in JSON source:
[
{"id":"00123","name":"Zoë, García","amount":19.95},
{"id":"00456","name":"李雷","amount":0}
]
- Leave Array JSON Pointer blank because the array is at the root. In CSV options and nested arrays, choose Comma, CRLF and UTF-8 BOM.
- Select Convert to CSV. Check the two rows in the preview, then choose Download CSV. The file begins with a UTF-8 byte order mark and contains these fields:
id,name,amount
"00123","Zoë, García",19.95
"00456","李雷",0
The BOM helps Excel recognise UTF-8 names. The comma inside Zoë, García stays within one quoted field. CSV quotes delimit text fields, but Excel can still infer 00123 as a number.
- In desktop Excel, use Data → From Text/CSV and select the downloaded file. Choose UTF-8 and the comma delimiter. Where available, turn off automatic type detection so the identifier stays text.
- Use Transform Data and set
idto Text before loading. If an automatic numeric conversion step already removed the zeros, replace that step and recheck the source. Confirm00123,00456and both names in the import preview.
Menu names depend on the Excel version. Microsoft's leading-zero guidance explains text-column imports. For more CSV edge cases, use the quoted-field and multiline example.
For an export above Excel's worksheet row limit, filter the records first or import an appropriate subset.
/stream
Convert a large JSON file to CSV without loading it into RAM
A selected File remains file-backed. The worker reads bounded chunks, validates the complete JSON document, discovers a stable header, and then re-reads the source while applying output backpressure. Memory use therefore depends on the chunk and at most one row's property ranges, not the total file size.
- Choose a JSON file or paste a small sample.
- Leave the pointer blank for a root array, or enter an exact pointer such as
/data/items. - Choose CSV delimiter, line ending and optional BOM.
- Convert and review the result in the browser, then copy or download it.
Convert a nested JSON array to CSV
This synthetic API response contains two records inside data.items. Paste it into JSON source and set Array JSON Pointer to /data/items. Keep the comma delimiter, CRLF line ending and BOM off, then select Convert to CSV.
{
"data": {
"items": [
{
"id": "00123",
"active": true,
"tags": [
"new",
"trial"
]
},
{
"id": "00456",
"active": false,
"tags": []
}
]
}
}
The complete CSV result has one row per object:
id,active,tags
"00123",true,"[""new"",""trial""]"
"00456",false,"[]"
The identifier 00123 remains a string in the source and is quoted in CSV. A spreadsheet may still infer a number when opening it; import that column as text if the leading zeroes matter. The tags arrays stay compact JSON inside quoted fields: this converter does not flatten nested objects or expand arrays into extra rows.
If the selected value is not an array of objects, check the pointer rather than changing the source. For a root array, leave the pointer blank. Inspect the result in the CSV Viewer, or use CSV to JSON to examine how CSV values become JSON types.
Measured 100 MiB JSON file conversion
On 6 November 2026, one measured run converted a synthetic 104,857,600-byte JSON file into 77,283,321 bytes of CSV. The preview was ready in 26.9 seconds; preview plus saving the complete output took 53.9 seconds. The test used automated, headless Chromium 151 on macOS with an Apple M4 Pro and 24 GiB of memory. The source stayed file-backed rather than being copied into the text input.
Large results show only a bounded preview. Saving the complete CSV rereads the source, so preview time is not complete-download time. These are observations for this fixture and machine, not a speed guarantee. The supported 4 GiB input limit was not benchmarked in this check.
Reproduce the large-file check
From a repository checkout with Node dependencies and Playwright Chromium installed, run:
npm run benchmark:json-to-csv:100mbThe benchmark source generates the fixture locally, checks preview and complete file writing, and removes its temporary files. Browser versions, hardware and data shape affect the result.
/mapping
Predictable JSON-to-CSV value rules
One object becomes one row
Top-level object properties become columns in first-seen order. Missing properties are empty, explicit null is null, booleans and numbers keep their JSON spelling, and strings are decoded and CSV-escaped.
Nested values stay intact
Nested objects and arrays become compact JSON inside one quoted field. The converter does not invent flattening rules or explode arrays into duplicate rows.
Every selected array member must be an object. Duplicate row keys and more than 10,000 distinct columns are rejected rather than silently discarded.
/limits
Browser support and practical limits
Direct multi-gigabyte writing requires a desktop browser with File System Access support. For larger results that require a second pass, browsers without direct file saving use a Blob download fallback capped at 100 MiB for both source and output. The source limit is 4 GiB; the completed CSV can be larger when written directly.
Is any data uploaded?
No. The file, pointer, column names and resulting CSV never leave the browser. Analytics receives only a content-free activation after successful completion.
/faq
Large JSON to CSV questions
Are nested objects flattened?
No. A nested object or array remains compact JSON inside one quoted CSV field, avoiding invented column names or duplicate rows.
Why are two passes required?
The first pass discovers the complete stable header and validates every row. The second can then write each row once in that column order.