CSV to JSON
Convert CSV to JSON with a real RFC 4180 parser: quoted commas, doubled quotes, multi-line fields and CRLF endings are all handled. Numbers and booleans become real JSON types, and oversized integers stay strings so nothing is silently rounded.
Converter ToolsHow to use CSV to JSON
- Paste CSV into the input panel, including its header row.
- The JSON appears immediately as an array of objects.
- Pick the delimiter if your file uses semicolons or tabs.
- Turn off "First row is a header" to get an array of arrays instead.
- Copy the JSON, or download it as data.json.
Examples
A quoted comma
The comma inside the quotes is data, not a separator.
id,name
1,"Alpha, Inc."
[{ "id": 1, "name": "Alpha, Inc." }]An escaped quote
Two double quotes inside a quoted field mean one literal quote.
note
"Said ""hi"""
[{ "note": "Said "hi"" }]A multi-line field
A line break inside quotes stays part of the value.
id,note 1,"First line second line"
Features
- RFC 4180 parser: quoted delimiters, doubled quotes and multi-line fields all work
- Accepts LF and CRLF line endings, and normalises them inside quoted values
- Comma, semicolon or tab delimiters
- Optional header row; without it you get an array of arrays
- Type inference for numbers, true, false and null, which can be switched off
- Integers too large for JavaScript to hold exactly stay as strings, so no precision is lost
- Unnamed columns become column_1, column_2 and so on
- Malformed files report the line, the column and the reason
- 2-space, 4-space or tab indentation for the output
Frequently asked questions
- Why not just split on commas?
- Because real CSV contains commas inside quoted fields, quotes escaped by doubling, and line breaks inside values. Splitting on commas corrupts all three. This tool scans the file character by character, which is the only way to get them right.
- How are types decided?
- Plain numbers become numbers; true, false and null become their JSON equivalents; everything else stays a string. You can turn inference off to keep every value as a string.
- What happens to very long numeric IDs?
- They stay strings. A 20-digit identifier cannot be represented exactly as a JavaScript number, and converting it would silently change the value — which is much worse than leaving it as text.
- Can I use it with semicolon or tab files?
- Yes. Semicolon files are common where the comma is a decimal separator, and tab-separated files are common exports. Both are one click away.
- What if my file has no header row?
- Turn off "First row is a header" and you get an array of arrays, with every row treated as data.
- What happens with an unterminated quote?
- The tool stops and tells you which line and column the problem is on. It does not guess, because a guess would produce plausible-looking but wrong data.
Related tools
About CSV to JSON
CSV to JSON is part of Converter Tools on ToolHive, a growing collection of small, focused utilities for developers, designers and students. Convert between encodings, cases and data formats in a single click. Everything runs client-side, so your data never leaves the browser tab — which makes these tools safe to use with work-in-progress code and private content.