Data tools · Browser calculation
JSON to CSV Converter
Convert a JSON array of objects into CSV with columns from every record—not just the first. Review nested values, identifiers, and formula-like text before export.
How to convert JSON to CSV
- Paste a non-empty JSON array whose records are objects. Each object is one output row.
- Choose how to handle nested values. Review the formula-prefix option.
- Convert and inspect the union of columns, result, and notes. Then copy or download the CSV.
The conversion code runs in your browser and does not upload the pasted content. See the privacy policy for separate site analytics and feedback behavior. Do not paste credentials or private customer records.
Worked example: fields that appear in later records
[
{"id": "00123", "name": "Ada"},
{"id": "00124", "active": true}
]
The union of keys is id,name,active. Missing fields become empty cells rather than dropping the later column:
"id","name","active"
"00123","Ada",""
"00124","","true"
Columns are collected in first-encounter order using JavaScript object-key enumeration; integer-like keys enumerate in numeric order. This is not a custom column-mapping tool.
Nested objects and arrays: an explicit policy
By default, an object or array becomes compact JSON text inside one CSV cell. For {"id":"1","profile":{"city":"東京"}}, the profile cell contains {"city":"東京"}, with quotes escaped for CSV. Arrays also stay in a single cell; neither arrays nor objects are expanded into new rows or flattened into dotted paths. Select “Report an error instead” if your destination only accepts flat records.
Identifiers and precision
Keep IDs, postal codes, and exact decimal values in JSON strings: "00123" and "9007199254740993123". The converter rejects unquoted integers outside JavaScript's safe integer range, negative zero, non-finite results, and number literals whose decimal value would change on parsing. Other numeric notation may normalize: 1.0 becomes 1, and 1e3 becomes 1000. Precision already lost before pasting cannot be recovered.
CSV quoting is not a type guarantee. A spreadsheet can turn "00123" into 123 or round a long ID. Use the destination's text/CSV import flow and explicitly set identifier columns to text; inspect a synthetic sample before importing important data.
Formula-like text: inspect before opening a spreadsheet
A spreadsheet can interpret imported text beginning with =, +, -, or @ as a formula. The default prefix option adds an apostrophe to matching string cells and headers, including leading ASCII whitespace, initial tab or newline, and full-width variants of these markers. For example, the string =1+1 becomes '=1+1. A typed JSON number such as -2 remains a number representation.
This is an intentional text change, not a universal guarantee. Some applications preserve or strip prefixes differently, especially after editing and re-saving. Turning the option off exports original text; the converter warns when it finds formula-like strings. See OWASP's CSV injection guidance. Avoid untrusted spreadsheet formulas and review import settings.
Empty values, errors, and limits
Missing keys, JSON null, and empty strings all become empty CSV cells, with a note for missing and null values. This distinction is not recoverable from the CSV alone. Duplicate JSON keys, empty column names, invalid JSON, a non-object record, and unsafe number literals cause a clear error rather than silently discarding or rounding data. If prefix protection creates duplicate header names, rename those keys or use a text-only import with protection disabled.
Limits: 1,000,000 input characters, 10,000 records or items per nested array, 200 union columns, 100,000 total output cells including headers, 100,000 characters per string or exported cell, 32 nesting levels, and 4,000,000 output characters. A separate bound on total nested JSON values also applies. Smaller combinations can hit these limits first. Output uses quoted comma-separated fields, doubled internal quotes, and CRLF record endings following common CSV conventions.
This tool does not create workbook files, save column mappings, flatten nested structures, preserve null/missing distinctions, or schedule imports. Use the six synthetic examples above to check the current behavior before using your own data.