Why use this converter
Type inference
CSV cells are untyped strings. JSONLab infers integers, floats, booleans, and null from cell content, producing properly typed JSON values automatically.
RFC 4180 parser
Handles quoted fields with embedded commas, doubled quotes for literal quotes, and multi-line cell values. The parser is a proper state machine, not a naive split.
Any delimiter
Comma, semicolon, tab, pipe — choose what your data uses. Auto-detection of the most likely delimiter is also available for ambiguous cases.
Conversion explained
1. Parse rows
A state-machine parser walks the input character by character, tracking whether we're inside a quoted field, just closed a quote, or in raw text.
2. Use headers
If "Header row" is enabled (default), the first parsed row becomes the keys of each output object. Otherwise, rows are emitted as arrays of values.
3. Infer types
Each cell value is checked against integer, float, boolean, and null patterns. If none match, it stays as a string.
CSV to JSON Converter — frequently asked questions
How does type inference work?
Each cell value is tested in order: empty string becomes null, "true"/"false" becomes boolean, integer pattern becomes number, float pattern becomes number, otherwise string. Quoted fields are always strings.
Can I keep all values as strings?
Currently no — type inference is always on. If you need raw strings, post-process the JSON output. We may add a "no inference" option in a future release based on user demand.
What if my CSV has no header row?
Uncheck "Header row" in the toolbar. Each row will be emitted as an array of values instead of an object.
How are multi-line cell values handled?
If a quoted field contains newlines, the parser correctly captures them as part of the cell value. This is uncommon but supported by RFC 4180.
You might also like
JSON to CSV
Convert JSON array to CSV spreadsheet
JSON to XML
Convert JSON to XML format
JSON to YAML
Convert JSON to YAML format
JSON Validator
Validate JSON syntax with detailed error messages
JSON Formatter
Format and beautify JSON with custom indentation
JSON Beautifier
Pretty-print JSON with syntax highlighting