Flattening nested JSON for tabular output
JSON is hierarchical (objects nested within objects), while CSV is strictly two-dimensional (rows and columns). Our converter handles nested objects by flattening keys with dot notation (e.g., "address.city" becomes a column header). Arrays within JSON objects are the hardest case — an array of addresses for one user produces either multiple rows (denormalized) or a single JSON-stringified cell. Our tool offers both modes: "expand" creates one row per array element (repeating parent data), and "compact" stores arrays as JSON strings in a single cell.
Large JSON arrays (100,000+ objects) can cause browser memory issues because the entire dataset must be processed client-side. For production ETL pipelines, use a backend tool like jq or a streaming CSV parser. Our tool is best suited for moderate-sized data (up to ~10 MB of JSON) for analysis or import into spreadsheet applications.
CSV encoding pitfalls
CSV has no official encoding standard (RFC 4180 is the closest). Common issues include: values containing commas (must be quoted with ""), values containing double quotes (must be escaped as ""), and multi-line values (must be quoted). Our converter follows RFC 4180 strictly: all cells are properly quoted and escaped. It also detects the delimiter — some systems expect semicolons as delimiters (European locales) — and lets you switch between comma, semicolon, and tab. For Excel compatibility (especially on non-English systems), semicolon-delimited CSV is often required.
Character encoding is another common source of errors. Our converter outputs UTF-8 with BOM, which Excel for Windows uses to correctly detect the encoding. Without the BOM, Excel may interpret UTF-8 text as Windows-1252, mangling special characters like accented letters and em dashes.