Flattening nested JSON objects into spreadsheet rows
API responses, webhook logs, and NoSQL exports store data as nested trees, whereas spreadsheets and BI tools expect flat rectangular tables. This browser converter flattens JSON objects into CSV rows locally in your tab without sending payloads to any server.
Dot-notation headers and compact JSON array cells
Nested objects flatten recursively into dot-separated column names such as address.city and address.country, while empty child objects ({}) become blank cells. When a field holds a nested array such as ["new", "vip"], expanding it into extra rows would distort aggregate counts.
Instead, the serializer writes nested arrays as compact JSON strings inside a single delimited cell. That keeps one record per row in line with the W3C Model for Tabular Data and Metadata on the Web.
Union column scanning across jagged API payloads
Real-world API collections are rarely uniform because optional attributes only appear on certain records. A naive converter that reads keys from the first element alone silently drops fields introduced later in the array.
Before writing a single row, this engine scans every object in order of appearance to collect the full union of column headers. Missing properties in earlier or later rows become empty cells, and you can convert CSV rows back to JSON anytime using the direction switch.
Handling delimiters, CRLF line breaks, and RFC 4180 quoting
Exporting clean tabular text requires matching your target spreadsheet’s delimiter expectations while escaping punctuation safely. Under the IETF RFC 4180 Common Format and MIME Type for CSV Files, records terminate with CRLF (\r\n) and fields containing delimiters, quotes, or line breaks must be wrapped in double quotes.
Choosing comma, semicolon, tab, or pipe separators
Under Separator, pick Comma (,) for standard RFC 4180 CSV, Semicolon (;) for European Excel locales where commas serve as decimal separators, Tab for TSV imports, or Pipe (|) for log pipelines. Selecting the right separator upfront avoids single-column import errors.
Downloaded files use text/csv;charset=utf-8 so accented characters such as Chloé or São Paulo stay readable across editors. Switching between Comma (,) and Semicolon (;) updates the live output immediately without re-uploading or re-parsing your source file.
Escaping embedded quotes, newlines, and whitespace
Every cell passes through a quoting check before joining the row. Whenever a value contains the active separator, a double quote ("), a carriage return or newline, or leading or trailing whitespace, the formatter wraps the cell in double quotes and doubles internal quotes ("").
If a pasted payload fails to parse because of trailing commas or unquoted keys, open the JSON formatter and validator to pinpoint the exact line and column.
Which JSON shapes convert cleanly into CSV tables?
Arrays of objects, single-key API wrapper objects, arrays of arrays, and single flat objects all convert directly into CSV rows, whereas bare primitives such as a standalone string or number are rejected. Validating input against the IETF RFC 8259 JSON Data Interchange Standard ensures predictable table mapping.
| Input JSON shape | Example payload | Wrapper handling | Resulting CSV structure |
|---|---|---|---|
| Array of objects | [{"id":1,"name":"Asha"}] |
Direct row list | Union dotted headers plus one row per object |
| Single-key wrapper | {"items":[{"id":1}]} |
Unwraps sole array key | Same rows as unwrapping the inner array |
| Multi-key object | {"meta":1,"items":[...]} |
Treated as one object | Single data row with meta and items columns |
| Array of arrays | [[1,"Asha"],[2,"Ben"]] |
Direct matrix passthrough | Raw rows with no synthesized header line |
| Bare primitive | "hello" or 42 |
Rejected with error | Prompts for a list ([...]) or object ({...}) |
When your downstream workflow requires an .xlsx workbook with auto-sized column widths and frozen headers rather than plain text, pass the exported file to CSV to Excel. During conversion, null or missing keys map to blank cells while false and 0 remain explicit literal values in the spreadsheet. This distinction prevents downstream BI filters from confusing zero counts with missing records.
Preserving 64-bit IDs and preventing Excel formatting bugs
Numeric identifiers and large file sizes are the two most common sources of silent data corruption when moving API exports into spreadsheets. Inputs up to 20 MB run locally, with payloads over 64 KB (65,536 characters) offloaded to a Web Worker using a 120 ms debounce.
Keeping >53-bit Snowflake and database IDs exact
According to the MDN Number.MAX_SAFE_INTEGER Documentation, standard JavaScript Number values lose integer precision above 9,007,199,254,740,991 (2^53 - 1). Naive JSON.parse() calls silently round 64-bit Snowflake IDs and database keys.
This converter isolates integer tokens of 16 or more digits outside quotes as BigInt values before flattening, preserving every digit in the CSV text. Even when a 64-bit identifier appears inside a nested array cell, the custom JSON serializer writes its exact string digits without scientific notation or rounding.
Opening CSV files in Excel without scientific notation
Even when a CSV file contains exact 18-digit or 19-digit IDs, double-clicking it in Excel triggers automatic numeric parsing that rounds numbers beyond 15 significant digits into scientific notation (9.0072E+15).
Tip: In Microsoft Excel, use Data → From Text/CSV and set long identifier columns to Text before loading so trailing digits are never replaced with zeros.
If you need human-readable configuration files rather than flat spreadsheet rows, generate structured YAML configs from JSON in the same browser-only workspace.