How to use the CSV to JSON converter
- Choose the direction under Convert: CSV → JSON (default) or JSON → CSV.
- Paste into Input (CSV or JSON), or drop a file above it: CSV, TSV, TXT, XLSX, XLS or ODS, and also JSON for the reverse direction.
- Leave Delimiter on Detect automatically, or pick comma, semicolon, tab or pipe. Keep First row is a header ticked if row 1 holds column names.
- For CSV → JSON, set Detect numbers and true/false, Empty cells become null (otherwise empty strings) and JSON indentation. For JSON → CSV, choose Flatten nested objects to dot.paths.
- Copy or download the result. A table preview of up to 1,000 rows appears below it.
What it does and when to use it
Use CSV → JSON to feed a spreadsheet export into an API, a test fixture or a database import. With a header row you get objects keyed by column name; without one, an array of arrays. JSON → CSV makes API results easy to open in a spreadsheet.
Related tools: JSON to CSV, CSV to Markdown table for docs, and the CSV cleaner to fix messy data first.
How it works
Everything runs in your browser. Text is parsed with papaparse, which handles quoted fields and line breaks inside quotes. Dropped spreadsheets are read with SheetJS, and a CSV that is not valid UTF-8 is read as Windows-1252, with a note. Files over 4 MB are processed in a background worker so the page stays responsive.
A cell becomes a number only if it is a plain integer, decimal or exponent number such as 1.5e3: no leading zeros, no thousands commas, and either a safe JavaScript integer or a decimal with at most 15 significant digits. Exactly true or false become booleans. Everything else stays text, and parser problems such as an unclosed quote are listed with their row.
Worked examples
These are the tool’s own outputs.
The sample. Three US cities give objects like this one, where the empty notes cell is null:
"zip": "02134",
"city": "Boston",
"population": 675647,
"active": true,
"notes": null
The next row has "zip": 94105, a number.
Semicolons and a decimal comma, minified. sku;qty;price data gives [{"sku":"A-01","qty":3,"price":"4,50"},{"sku":"B-02","qty":12,"price":19.99}].
A repeated header and a huge number. name,name,score with Asha,Rao,9007199254740993 gives "name_2":"Rao", and the score, beyond 2⁵³, stays a string.
JSON → CSV with flattening. An object with a nested user (a name and a tags array) and one with an extra key become:
id,user.name,user.tags,extra
1,Ann,"[""a"",""b""]",
2,,,true
Limits and tips
- Only the first sheet of a workbook is read.
- Dates stay text, exactly as written or displayed.
Frequently asked questions
Why did 02134 stay a string while 94105 became a number?
Can I upload an Excel file?
How does JSON to CSV handle nested data?
My European CSV with decimal commas shows 4,50 as text. Why?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.