/tools/csv-to-json
CSV to JSON Converter
Convert CSV files or pasted tabular data into clean, formatted JSON.
CSV input
JSON output
Convert spreadsheet rows or TSV to JSON
Rows copied from a spreadsheet commonly use tabs between cells. Paste this tab-separated example, keep the first row as headers, and leave type inference off:
name score
Ada 2
Automatic delimiter detection produces [{"name":"Ada","score":"2"}]. If the preview has one combined column, select the tab delimiter explicitly and convert again. Turn on type inference only when 2 should be a JSON number.
A CSV file can use commas or semicolons instead. Select the delimiter that matches the source and review quoted fields before downloading the JSON.
/usage
How to convert CSV to JSON
- Paste CSV, drop a file onto the input, or choose a file from your device. Small inputs convert automatically after you pause; use Convert to JSON to run it immediately or process larger input.
- Keep automatic delimiter detection or choose comma, tab, semicolon, or pipe.
- Choose whether the first row contains headers and whether values should be inferred.
- Copy or download the output, or inspect it in the online JSON Viewer & Formatter.
Convert quoted and multiline CSV to JSON
Paste this synthetic CSV. Keep the first row as headers, use the comma delimiter and leave Infer numbers, booleans, and null off. The newline inside the quoted note belongs to one cell, not a second record.
id,name,active,count,note
00123,"Ada, Lovelace",true,2,"first line
second line"
Select Convert to JSON. With inference off, every cell is a string:
[
{
"id": "00123",
"name": "Ada, Lovelace",
"active": "true",
"count": "2",
"note": "first line\nsecond line"
}
]
What changes when type inference is enabled?
Open Conversion options, enable inference and convert again. The boolean and count become typed values:
[
{
"id": "00123",
"name": "Ada, Lovelace",
"active": true,
"count": 2,
"note": "first line\nsecond line"
}
]
The identifier 00123 stays a string even with inference enabled because this parser excludes leading-zero numbers. Inference is based on spelling, not your business rules: leave it off when values such as true must remain text. The quoted comma and embedded newline are preserved in both results; JSON displays that newline as \n.
If the result has one column, check the delimiter. If a quoted field is unfinished, close the quote before converting. For the reverse task, convert a nested JSON array to CSV.
/capabilities
Reliable CSV parsing without an upload
Quoted and multiline fields
The parser handles delimiters inside quoted fields, escaped double quotes, Windows or Unix line endings, and line breaks inside quoted values.
Predictable JSON keys
Blank and repeated headers receive stable names, while uneven rows are reported rather than silently ignored. Values remain strings unless inference is enabled.
/faq
CSV conversion questions
Is my CSV uploaded?
No. The selected file or pasted CSV is read and converted by a dedicated worker inside this browser. Its contents are not sent to Data Demon.
Why are values strings by default?
CSV does not carry data types. Keeping strings protects identifiers such as 00123. Enable inference when you explicitly want JSON numbers, booleans, and null values.
What happens when rows have different lengths?
The converter keeps every value, fills missing cells with empty strings, creates stable keys for extra columns, and reports the inconsistency in the status line.