Understanding JSON ⇄ CSV
Tree to table, table to tree.
CSV is the lowest common denominator for tabular data. JSON is everything else.
CSV is two-dimensional; JSON isn't.
CSV expresses a table: rows of values separated by commas, one row per line, the first row optionally a header. JSON can describe a table but can also describe arbitrary nested data. This converter expects the JSON side to be an array of flat objects — exactly the shape that maps cleanly to rows and columns.
[{"id":1,"name":"Ada"}, {"id":2,"name":"Grace"}] ⇄ id,name\n1,Ada\n2,Grace
RFC 4180 — the closest thing to a spec.
CSV has no canonical specification. RFC 4180 is the closest everyone agrees on: comma separator, optional CRLF line endings, double-quoted fields, doubled-up quotes inside quoted fields. The converter follows RFC 4180 on output (always quoting fields that contain commas, quotes, or newlines) and is forgiving on input (accepts LF, double quotes, or none).
Type information is lost.
CSV is plain text. 1 and "1" are indistinguishable; true is just a string; dates are whatever ISO 8601-shaped string you wrote. When converting CSV to JSON, every field comes back as a string unless your downstream parser does its own type inference. When converting JSON to CSV, types are flattened to their string representation — booleans become true / false, null becomes the empty string.
Excel and the BOM.
Excel reads CSV files in the system's default code page unless the file starts with a UTF-8 byte-order mark. If your CSV has accented characters, emoji, or non-Latin scripts and Excel mangles them, the fix is usually adding a BOM at the front. This tool emits plain UTF-8 without a BOM — convenient for code, occasionally inconvenient for spreadsheet tools. Save the output and prepend \\ufeff if Excel is the destination.
When CSV is the wrong tool.
Use CSV for single-table exports, spreadsheet handoffs, and quick database dumps. Avoid it for nested or hierarchical data — flattening a nested structure into columns produces either a sparse table with too many columns or a join that duplicates parent rows. Either reach for JSON, or pick a richer tabular format like Parquet.