How to use CSV to JSON
- Paste CSV or TSV text with a header row (or untick "First row is a header").
- Adjust delimiter, type inference and nesting options.
- Copy or download the resulting JSON array.
CSV to JSON features
- RFC 4180 parser: quoted fields, embedded delimiters, newlines and doubled quotes
- Automatic delimiter detection (comma, semicolon, tab, pipe)
- Type inference for numbers, booleans and null; empty cells optionally become null
- Rebuilds nested objects and arrays from dotted headers (address.city, tags.0)
- Reports rows with the wrong number of fields and duplicate headers
- Choice of indentation or minified output
CSV to JSON example
Quoted fields and nested columns
Input:
id,name,address.city,active
1,"Jamil, Sara",Jeddah,trueOutput:
[
{
"id": 1,
"name": "Jamil, Sara",
"address": { "city": "Jeddah" },
"active": true
}
]Frequently asked questions about CSV to JSON
Which delimiters are supported?
Comma, semicolon, tab and pipe. Auto-detect picks the delimiter that appears most consistently across the first lines.
Are quoted fields with commas or newlines handled?
Yes. The parser follows RFC 4180: fields wrapped in double quotes may contain the delimiter, line breaks and doubled quotes ("").
How does type inference work?
Cells that look like integers, decimals, true/false or null are converted to the matching JSON type. Numbers with leading zeros (such as 007) stay strings. Disable inference to keep everything as text.
Can I rebuild nested objects from column names?
Yes. Headers such as address.city or tags.0 are turned back into nested objects and arrays when "Nest dotted columns" is enabled.
Technical notes
The parser is a single-pass state machine: a leading BOM is dropped, \r is ignored outside quotes (CRLF and LF work, CR-only files do not), and a quote is special only at the start of a field, so x"y stays literal. Delimiter detection scores comma, semicolon, tab and pipe over the first ten lines, taking the highest per-line minimum, doubled when consistent. Every cell is trimmed, quoted or not.
Type inference is deliberately narrow: only null/NULL, true/TRUE, false/FALSE, integers of at most 15 digits without a leading zero, and decimals with a digit after the point (optionally with an exponent) are converted — 007, 1e3, +1, 1,000 and 16-digit IDs stay strings. Quoting a cell does not shield it; untick the option instead. Dotted or bracketed headers (a.b, x[0]) are rebuilt by unflattenJson, numeric segments becoming arrays; when paths conflict the later column wins.