What this tool does
Convert CSV to JSON
This page maps each retained CSV row to headers and generates one of three JSON shapes. Safe type inference recognizes booleans, null and numeric values without converting identifiers that start with zero.
Private, local-first data tools
Turn CSV rows into objects, two-dimensional arrays or JSON Lines, with optional type inference and explicit empty-value handling.
Switching direction clears the current input, settings and result, and cancels any running operation. Download anything you need first.
Open or paste CSV, then export JSON or JSON Lines with explicit type and empty-cell options.
The parser runs off the main thread. Once loaded, you can search, sort, validate, repair and export without an account.
CSV fields start as text. Converting them to JSON requires decisions about identifiers, numbers and missing values that CSV itself cannot express. Confirm the first-row setting before exporting: object keys come from the detected or selected headers. UseUse as header when you know the first record contains column names.
With type inference enabled, each cell is inspected separately. There is no whole-column schema, so one column can contain both numbers and strings. Leading and trailing spaces are ignored for recognition; an ordinary text value that does not match a rule retains its original spaces.
| CSV field | JSON result with inference |
|---|---|
true, TRUE, False | Boolean true or false |
null, NULL | null, even when empty-as-null is off |
12.50, -3, 1e3 | Numbers 12.5, -3, 1000 |
00120, +12, .5 | Strings; these spellings do not match the numeric rule |
9007199254740993, 1e309 | Strings; unsafe integers and non-finite results are not exported as numbers |
Decimal conversion uses JavaScript numbers, not exact decimal arithmetic. Disable inference when monetary precision or the original notation must survive unchanged. Disabling it also keeps true and null as literal strings. A quoted CSV field is still eligible for inference: CSV quotation protects separators, not a JSON type.
There are two controls, not three independent missing-value modes. With inference off, empty fields stay "" and whitespace remains unchanged; the empty-as-null checkbox has no effect. With inference on and empty-as-null off, empty or whitespace-only fields become "". With both enabled, they become null. There is no option to omit empty properties from object output.
A short row is a structural issue, not proof of an intentional null. Objects and JSON Lines supply an empty value for a missing trailing column and then apply those settings. Array output preserves the row's actual length. Entirely empty records are skipped during CSV parsing. Check malformed rows with the CSV validatorbefore treating an export as application-ready data.
id,active,amount,note
000184,true,12.50,
000219,false,0,nullWith inference on and empty-as-null off, thenulls and booleans fixtureproduces this object array. Automated tests exercise the real worker export and parse its downloaded bytes to verify these values:
[
{ "id": "000184", "active": true, "amount": 12.5, "note": "" },
{ "id": "000219", "active": false, "amount": 0, "note": null }
]Notice that 000184 stays an identifier, 12.50 loses its formatting zero, and the empty field differs from the word null. Theleading zeros fixtureprovides longer identifiers for a second check.
Choose objects when an API expects named properties. Choose arrays when a consumer expects positions: the first exported array contains headers, followed by data arrays. Array shape also preserves separate columns with identical labels. In objects or JSON Lines, exactly repeated header keys overwrite earlier values with the last column's value. Resolve duplicate headers before choosing a keyed format.
JSON Lines is useful for consumers that process one JSON object per line. It has no surrounding array or commas between records. A newline inside a CSV field becomes an escaped \n, so one record still occupies one output line:
{"id":"001","note":"first\nsecond"}
{"id":"002","note":"done"}This output choice does not remove the workbench's 250,000-row retention limit or make its conversion streaming. Export is blocked for preview-only sessions. For the reverse direction, use JSON to CSV; for nested objects, see thenested JSON conversion guide.
What this tool does
This page maps each retained CSV row to headers and generates one of three JSON shapes. Safe type inference recognizes booleans, null and numeric values without converting identifiers that start with zero.
Local files are read by a dedicated browser worker and are not uploaded to an application server. File contents and filenames are not included in analytics events. Loading a public URL is an explicit direct request from your browser and may fail when the remote server blocks CORS.
Use objects for most APIs, arrays when positional data is required, and JSON Lines for streaming or data-engineering workflows.
Identifiers with leading zeros remain strings. Other unambiguous numeric values can be inferred when the option is enabled.
They are empty strings by default, or you can export them as JSON null values.