CSV to JSON Converter Online
Convert CSV or TSV to clean JSON in your browser, with number, boolean, ISO-date and null inference and dotted-header nesting. Your data stays local.
This CSV to JSON converter runs entirely in your browser. The CSV you paste or the .csv file you drop is parsed on your device and never uploaded to ArrayKit.
Open the JSON to CSV converter
About CSV to JSON
This CSV to JSON converter parses a pasted CSV, a TSV, or a dropped .csv file and turns each row into a JSON object. It handles quoted fields, embedded commas and newlines, and auto-detects the delimiter, or you can force comma, tab, semicolon or pipe. Turn on type inference to coerce 42 into a number, true and false into booleans, 2020-01-01 into an ISO date, and empty cells into null, so the output is ready to use rather than all-strings. Dotted headers like user.name expand into nested objects, and you can emit a plain array of objects or a map keyed by the first column. It is handy for seeding a database, mocking an API, or importing a spreadsheet export. Everything runs on your device — no rows are uploaded.
Features
- Convert CSV or TSV to a JSON array of objects, or a map keyed by the first column
- Auto-detect the delimiter, or force comma, tab, semicolon or pipe
- Type inference: turn numbers, true/false, ISO dates and empty cells into real JSON values
- Expand dotted headers such as user.name into nested JSON objects
- Toggle the header row on or off — headerless CSV becomes field1, field2, …
- Handles quoted fields with embedded commas, quotes and line breaks
- Drop a .csv file or paste text, then copy or download the JSON
- Runs entirely in your browser with no rows sent anywhere
How to use the CSV to JSON
- Paste your CSV or TSV, or drop a .csv file into the input
- Pick a delimiter or leave it on Auto, and set whether the first row is a header
- Toggle number, boolean, ISO-date and null inference and dotted-header nesting
- Choose an array of objects or a map keyed by the first column
- Copy the JSON or download it as data.json
Example
Input
id,user.name,active
1,Ada,true
2,Linus,false
Output
[
{ "id": 1, "user": { "name": "Ada" }, "active": true },
{ "id": 2, "user": { "name": "Linus" }, "active": false }
]
With inference and dotted-header nesting on, id becomes a number, active a boolean, and user.name nests.
Common errors & troubleshooting
- IDs or zip codes like 007 lose their leading zeros. — Numbers with leading zeros are kept as strings on purpose. Only bare numeric strings such as 42 or -3.14 become numbers, so 007 and 01 stay text.
- Every value comes out as a string. — Type inference is per-type. Turn on the Numbers, Booleans and ISO dates toggles so 42, true and 2020-01-01 are coerced instead of quoted.
- The columns are split wrong or the whole row lands in one field. — The delimiter guess was off. Switch the delimiter from Auto to Tab, Semicolon or Pipe to match your file.
- The first data row is treated as keys, or the keys are field1, field2. — Flip the 'First row is header' toggle to match your file — on when the top row names the columns, off when the data starts on line one.
Frequently asked questions
- How does CSV to JSON handle type inference?
- Each string cell is checked in order: empty and 'null' become null, 'true'/'false' become booleans, bare numeric strings like 42 or -3.14 become numbers, and ISO dates like 2020-01-01 normalise to an ISO timestamp. Every coercion is a toggle you can turn off to keep raw strings.
- Why do my leading-zero IDs stay as strings?
- Values like 007 or 01 are intentionally left as strings so account numbers, zip codes and phone numbers are not mangled. Only numbers without a leading zero (or a single 0) are converted to JSON numbers.
- Can I turn a column like user.name into nested JSON?
- Yes. Enable dotted-header nesting and a header of user.name, user.role becomes { "user": { "name": ..., "role": ... } } for every row. Headers without a dot are kept flat.
- What is the difference between array output and keyed output?
- Array output gives a JSON array where each row is one object. Keyed output gives a single object whose keys are the values of the first column, so you can look a row up by its id instead of iterating the array.
- Does it work with tab-separated or semicolon files?
- Yes. Leave the delimiter on Auto to detect it, or force Tab for TSV, Semicolon for European exports, or Pipe. Quoted fields with embedded delimiters and newlines are parsed correctly either way.
- Is my CSV uploaded to convert it?
- No. The CSV is parsed and converted to JSON in your browser using JavaScript. The rows you paste or the file you drop never leave your device and are not sent to ArrayKit.
Related tools
- JSON to CSV — Convert an array of flat JSON objects to CSV.
- CSV to Markdown Table — Convert CSV or TSV data into a Markdown table, with alignment and header options.
- NDJSON to JSON — Convert NDJSON / JSON Lines to a JSON array and back, line by line.
- JSON Formatter — Beautify, minify and validate JSON with error locations.
- CSV to SQL — Convert CSV to SQL INSERT and CREATE TABLE statements for MySQL, PostgreSQL and SQLite.
- Excel to JSON — Convert an .xlsx or .xls spreadsheet to JSON, with sheet and header options, in your browser.
All ArrayKit tools