# Convert CSV to JSON

> Convert CSV data to JSON arrays or objects with customizable parsing options. Nothing logged, nothing sent.

Live tool: https://lofttools.com/tools/dev-tools/csv-to-json

Category: Dev Tools

## How it works

1. **Paste CSV** — Paste your CSV data or open a CSV file
2. **Configure** — Pick a delimiter (or let it auto-detect) and choose the output shape — array of objects, arrays, column array, or JSON Lines
3. **Tune output** — Toggle parse-numbers, lowercase keys, NULL → null, omit empty fields, or minify the result
4. **Copy JSON** — Copy the JSON output or download it as a .json file

## FAQ

### How does auto-detect delimiter work?

It scans the first non-empty line, counts unquoted commas, tabs, semicolons, pipes, and colons, and picks whichever occurs most often. You can override this with an explicit choice or a custom single character.

### Does it handle quoted fields, embedded commas, and escaped quotes?

Yes. Full RFC 4180 quoting is supported — fields wrapped in double quotes may contain the delimiter, newlines, or doubled ("") quotes which unescape to a single quote.

### Can I turn "42" into 42 in the JSON output?

Yes. Enable "Parse numbers" under Parsing options and integer or decimal cell values become JSON numbers. Values that aren't strictly numeric are left as strings.

### What output formats are supported?

Four shapes — Array of objects (default), Array of arrays (nested list), Column array (per-column arrays keyed by header), and JSON Lines / NDJSON (one record per line, ideal for streaming tools).

### What is the column type preview?

When headers are enabled, a row of chips shows the inferred type (number, boolean, null, string, empty) for every column based on all data rows — so you can see which columns will change if you enable parse-numbers before converting.

### Can I skip junk rows at the top of a CSV?

Yes. Set "Skip leading rows" under Parsing options to drop N rows before parsing — useful when exports prepend a title row or metadata.

## Privacy

This tool runs entirely in the browser. Files are not uploaded to a server. They never leave the user's device.

## More

- All tools: https://lofttools.com/tools
- Category: https://lofttools.com/tools/dev-tools
- LLM index: https://lofttools.com/llms.txt
