CSV to JSON
Processed Client SideConvert CSV or TSV data into a clean JSON array of objects, with header detection and type inference.
Bookmark this tool now — skip the search next time you need it.
About CSV to JSON
This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.
Paste CSV or TSV data — an export from a spreadsheet, a database dump, a log extract — and get back a clean JSON array of objects. The parser is a proper CSV parser rather than a split on commas: it understands quoted fields, delimiters and line breaks inside quotes, and doubled quotes as an escaped quote, so a value like "Smith, John" stays one field. It can auto-detect which delimiter your file uses, treat the first row as column names, and infer types so that numbers become numbers and true/false become booleans instead of everything arriving as strings.
Key features
- Real CSV parsing — quoted fields, embedded commas, embedded newlines, and doubled quotes are all handled correctly
- Auto-detect delimiter, or force comma, semicolon, tab, or pipe explicitly
- Header row mode maps each column name to a JSON key; turn it off to get arrays of values instead
- Infer types converts numeric strings to numbers and true/false to booleans, leaving genuine text alone
- Output indentation of 2 spaces, 4 spaces, or minified for a compact payload
- Syntax-highlighted JSON output so the resulting structure is easy to scan
- Handles ragged rows and trailing blank lines without producing junk records
- Copy the JSON in one click, ready to paste into a fixture, a seed script, or an API request
- Runs fully in your browser — spreadsheet exports containing personal data never get uploaded
How to use it
- Paste your CSV or TSV data into the input pane.
- Leave the delimiter on Auto-detect, or pick the exact one if your data is unusual.
- Keep Header row on if the first line holds column names — this is what turns rows into keyed objects.
- Turn Infer types on to get real numbers and booleans, or off to keep every value as a string.
- Choose 2 spaces, 4 spaces, or Minified for the output, then click Convert and copy the JSON.
Tips & common mistakes
- Turn Infer types off when a column holds IDs, ZIP codes, or phone numbers with leading zeros — inference will read 01234 as the number 1234 and lose the zero.
- Auto-detect looks at the delimiter frequency in the first rows. If your data has more semicolons inside quoted text than actual separators, set the delimiter explicitly.
- TSV files work as-is — pick Tab, or let auto-detect find it. Tab-separated data is often safer than CSV because tabs rarely appear inside real values.
- With Header row off you get arrays of values instead of objects, which is what most charting libraries and CSV loaders actually want.
- If your spreadsheet exported a UTF-8 BOM, the first column name can come through with an invisible prefix character. Delete the first character of the header line if the first key looks wrong.
- Minified output is the right choice when the JSON is going into an environment variable or a request body; indented output is for files people will read.
- Want to view the resulting array as a table rather than raw JSON? Open it in the CSV Viewer & Editor.