What this does
Turns spreadsheet rows into JSON objects, and JSON objects back into spreadsheet rows. The CSV parser is a hand-written character scanner that follows RFC 4180 — quoted cells, doubled quotes, embedded delimiters and embedded newlines all parse correctly, which is where naive split(',') approaches fall over. Both directions run in your browser, so a customer export never leaves your laptop.
How do I convert a CSV file to JSON?
- Leave the direction on CSV → JSON (it's the default).
- Set the delimiter if your file isn't comma-separated.
- Paste the rows, including the header line. Output appears as you type.
- Copy takes the result; Clear resets both boxes.
The first row is always treated as the header and supplies the object keys:
name,note
"Doe, Jane","line 1
line 2"
→
[
{
"name": "Doe, Jane",
"note": "line 1\nline 2"
}
] Does it detect numbers, booleans and dates?
No, and that is deliberate. Every cell comes out as a JSON string, so a,b / 1,2 gives {"a": "1", "b": "2"}. Type guessing is where CSV converters silently corrupt data: leading-zero part numbers lose their zeros, long IDs round into floats, NO in a country column turns into false, and 3-4 becomes a date. Cast the two or three columns you actually need in your own code.
How are quotes and line breaks inside a cell handled?
A cell that opens with " stays in quoted mode until a closing quote, so delimiters and newlines inside it are ordinary characters. Two consecutive quotes inside a quoted cell mean one literal quote — "he said ""hi""" parses to he said "hi". Going the other way, a cell is wrapped in quotes only when it contains a quote, the delimiter, a newline or a carriage return, and any inner quotes are doubled. Bare carriage returns outside quotes are discarded, so CRLF files from Windows need no preprocessing.
Which delimiters are supported?
Comma, tab, semicolon and pipe, chosen from the dropdown. There is no sniffing — if a European export uses semicolons and you leave the setting on comma, you get one giant column rather than an error, so check the dropdown first. Output is joined with LF newlines and carries no UTF-8 BOM, which matters for Excel on Windows: without a BOM it may misread accented characters unless you import rather than double-click.
What happens with ragged rows or duplicate headers?
Rows shorter than the header are padded with empty strings; cells beyond the last header column are dropped without warning. Duplicate column names collapse — the rightmost wins. Trailing rows in which every cell is empty are stripped, so a file ending in blank lines or a stray ,, won't produce phantom records. Check the object count against your row count if any of these might apply.
Why won't my JSON convert to CSV?
The top-level value has to be an array — a bare object raises Top-level value must be an array, so unwrap {"rows": [...]} first. Given an array of objects, the header is the union of every key across every row in first-seen order, so rows with missing keys still line up. Nested objects and arrays are re-serialised as JSON text inside the cell; null and missing values become empty. An array of arrays is written out verbatim with no header row. For reshaping the JSON beforehand, use the JSON formatter and validator, JSON to TypeScript for the types, or JSON ↔ YAML ↔ TOML for config formats.