Convert rows with quoted fields
CSV-to-JSON treats the first row as object keys. Choose the delimiter used by your file and decide whether numeric, boolean and null-like values should be converted to JSON types.
Example: keep a comma inside a company name
Use a comma delimiter and enable type inference. Input:
id,name,active
1,"Alice, Inc.",true
The result is [{"id":1,"name":"Alice, Inc.","active":true}], with optional indentation. The comma inside the quoted name stays in one field.
Preserve identifiers deliberately
Type inference changes 001 into the number 1; turn it off for identifiers and values whose exact text matters. Headers must be unique. JSON-to-CSV accepts objects or arrays of objects, includes the combined keys, and serializes nested objects as JSON text inside cells. It does not evaluate spreadsheet formulas or carry cell formatting.
Edge cases and hard limits
Files arrive through FileReader, then parseCsv() splits on the delimiter you select while tracking quote state — a quoted field may contain the delimiter, and a doubled quote inside a quoted field means one literal quote. quoteCsv() applies the inverse rules on output, and setMode() switches direction. A type-inference switch decides whether numbers and booleans come back as typed values or stay strings.
Formats, sizes and other limits
Only the common delimiters are offered: comma, semicolon, tab and pipe. Fields containing line breaks are handled in simple cases and can fail in nested ones. Files that are not UTF-8 arrive garbled, and there is no encoding picker. Converting JSON to CSV flattens nested objects into strings, so the structure does not survive a round trip. Very large files are processed in one pass and will stall the tab.
Privacy: processed in your browser
The file is read through the browser’s local File API and converted in memory. There is no backend that could receive the table.
Frequently asked questions
Why is my export from Excel garbled?
It was probably saved as the system ANSI encoding. Re-save as CSV UTF-8 in Excel, then convert again.
How do quoted fields work?
The whole field is wrapped in double quotes, and an internal quote is written twice. That is the RFC 4180 convention and what the parser expects.
Does it produce a real .xlsx?
No. The output is CSV text; open it in a spreadsheet and save as xlsx if you need the workbook format.