How does RFC 4180 CSV to JSON parsing work?
The converter reads spreadsheet text in a local Web Worker, strips any leading UTF-8 byte order mark, and tokenizes rows according to the IETF RFC 4180 Common Format and MIME Type for CSV Files. Quoted fields preserve embedded commas, semicolons, and newline characters while collapsing doubled "" quotes into literal quote marks.
Auto-detecting comma, semicolon, tab, and pipe delimiters
When Separator is set to Auto-detect, the detector scans up to 10,000 characters and 10 logical rows across four candidate delimiters: comma (,), semicolon (;), tab (\t), and pipe (|). It counts unquoted occurrences per row and selects the separator with the highest row-to-row consistency, which converts TSV exports (tsv to JSON) and European semicolon spreadsheets cleanly without manual setup.
If your source workbook is still in .xlsx or .xls format, convert it first using the Excel to CSV converter before transforming rows into JSON.
Stripping UTF-8 BOMs and handling quoted line breaks
Excel and Windows reporting tools frequently prepend an invisible U+FEFF UTF-8 BOM before the first column header, which would otherwise corrupt the first JSON property key. Stripping the BOM automatically ensures "id" stays "id" rather than "\ufeffid".
When a spreadsheet contains an unclosed opening quote, unclosedQuoteLine halts parsing and reports the exact line number where the missing closing quote occurs. That pinpoints broken rows immediately without scanning thousands of lines manually.
Empty lines where every cell is whitespace are filtered out automatically so trailing blank rows at the end of a spreadsheet never produce empty JSON objects.
Safe type inference for 64-bit IDs and leading zeros
Turning raw text cells into native JSON primitives makes downstream code cleaner, yet aggressive type casting can silently corrupt identifiers. When Numbers and true/false as values is enabled, the parser applies strict rules before converting "true", "false", "null", integers, and decimals.
Preserving 53-bit safe integers vs warehouse SKU strings
JavaScript numbers follow IEEE-754 double precision and lose exact integer fidelity above 53 bits, as documented in the MDN Number.isSafeInteger() Reference. Any integer outside Number.isSafeInteger stays a quoted JSON string so 64-bit Snowflake IDs and payment references never round their final digits.
Similarly, scientific-notation strings without a decimal point or explicit +/- sign, such as warehouse SKU 12E4, remain strings instead of turning into 120000. Unchecking Numbers and true/false as values keeps every cell as text, preserving leading zeros in ZIP codes and phone numbers.
| CSV cell value | Type inference ON | Type inference OFF | Reason |
|---|---|---|---|
42 |
42 |
"42" |
Safe integer within 53 bits |
9007199254740993 |
"9007199254740993" |
"9007199254740993" |
Exceeds 53 bits (Number.MAX_SAFE_INTEGER) |
12E4 |
"12E4" |
"12E4" |
No decimal or +/- exponent sign |
true / null |
true / null |
"true" / "null" |
JSON boolean and null literals |
02139 |
2139 |
"02139" |
Leading zero kept only when OFF |
Header-based JSON objects vs 2D row arrays
When First row is column names is checked, each data row becomes a JSON object keyed by the header row, with duplicate column headers disambiguated as _2 and _3. Unchecking it outputs a 2D JSON array of arrays, which is useful when comparing raw tabular CSV vs JSON representations.
After exporting data.json, you can validate and prettify exported JSON payloads or inspect deeply nested keys in a collapsible tree view.
Bidirectional JSON to CSV conversion and nested objects
Switching Direction to JSON → CSV reverses the workflow inside the same workspace, turning an IETF RFC 8259 JSON Data Interchange Standard array back into spreadsheet-ready data.csv with \r\n (CRLF) line endings.
Flattening nested keys into dotted spreadsheet columns
Nested JSON objects flatten recursively into dotted column names such as address.city and address.country, while arrays inside cells serialize as compact JSON strings. Any cell containing the active delimiter, quotes, newlines, or leading/trailing whitespace is automatically wrapped in double quotes with internal quotes doubled.
Unwrapping single-key API arrays and preserving BigInts
REST APIs often wrap lists inside a single-property object such as {"items": [...]}. When a top-level object holds one array property with no sibling scalar keys, the converter unwraps that array into rows automatically and preserves BigInt integers intact; for dedicated reverse workflows, use JSON to CSV.
If the input JSON is an array of arrays rather than an array of objects, the serializer preserves the exact row and column grid without synthesizing header keys. Every scalar value is escaped cleanly for Excel and Google Sheets.
Tip: Disable Numbers and true/false as values before converting postal codes, product SKUs with leading zeros, or version numbers like
1.10that must remain exact strings.
Handling large spreadsheets and delimiter workflows
Because all CSV and JSON transformations execute inside a background Web Worker, multi-megabyte exports process without locking scroll or typing in your browser tab. Choosing Tab or Pipe (|) under Separator handles log exports and database dumps where commas appear frequently inside unquoted text.
When working with sensitive payroll ledgers, customer exports, or bank statements, running the conversion locally in JavaScript eliminates third-party server retention risks. You can paste raw clipboard data from Excel or Google Sheets directly, or open .csv, .tsv, .json, and .txt files from disk and download clean data.json or data.csv outputs.
When a multi-million-row CSV export exceeds what your spreadsheet editor or downstream importer accepts in a single file, split large CSV files into smaller chunks locally before converting each batch to JSON. Every byte stays on your machine with zero server requests.