CSV to JSON Converter

Convert CSV files to JSON arrays online. Paste or upload your CSV and download the result as a .json file. Free, private, runs in your browser.

This CSV to JSON converter transforms comma-separated values into a JSON array of objects. The first row provides the keys; each subsequent row becomes one object. Commas, tabs, and semicolons are detected automatically. Click Convert to parse, then Download JSON to save converted.json. Everything runs locally—your data never leaves your browser.

CSV
JSON

How to convert CSV to JSON

  1. Paste or upload your CSV — Type or paste CSV text into the left panel, or click Upload CSV to select a .csv or .txt file from your device.
  2. Click Convert — The converter parses your CSV and displays the resulting JSON array in the right panel.
  3. Copy or download — Click Copy to copy the JSON to your clipboard, or Download JSON to save it as converted.json.

Need the reverse? Use the JSON to CSV converter to turn JSON arrays back into CSV files.

Convert CSV to JSON in JavaScript

Using Papa Parse (recommended)

Papa Parse is a fast CSV parser that works in browsers and Node.js. With header: true, the first row becomes object keys:

import Papa from 'papaparse';

const csv = `name,age,city
Ada,30,London
Bob,25,Paris`;

const result = Papa.parse(csv, {
  header: true,
  skipEmptyLines: true,
  dynamicTyping: true
});

console.log(result.data);
// [{ name: "Ada", age: 30, city: "London" },
//  { name: "Bob", age: 25, city: "Paris" }]

Minimal split-based approach

For simple CSVs without quoted fields, you can split on newlines and commas. This does not handle commas inside quotes, escaped quotes, or multi-line fields:

function simpleCsvToJson(csv) {
  const lines = csv.trim().split('\n');
  const headers = lines[0].split(',');
  return lines.slice(1).map(line => {
    const values = line.split(',');
    return headers.reduce((obj, key, i) => {
      obj[key] = values[i];
      return obj;
    }, {});
  });
}

// Caveat: fails on "Ada,""nickname"",London" or
// fields containing commas. Use Papa Parse for
// production code.

Node.js with csvtojson

The csvtojson package reads CSV files and streams in Node.js:

import csvtojson from 'csvtojson';

// From file
const json = await csvtojson().fromFile('data.csv');

// From string
const json2 = await csvtojson().fromString(csvText);

CSV to JSON in Python

The snippet below reads the first row as object keys with CPython csv.DictReader (stdlib csv module, excel dialect) and prints a JSON array with json.dumps. That is the same header-row → array-of-objects shape this page returns. It is not Papa Parse, and Node has no stdlib CSV parser — the csvtojson example above is an npm package. csvkit csvjson samples are in CSV to JSON in the shell below. For the reverse direction, see JSON to CSV converter.

Python with csv.DictReader

Pass a file opened with newline='' (or io.StringIO) so the csv module owns line endings. Omit fieldnames to use the first row as keys, matching this page's header: true:

import csv
import io
import json

text = """name,age,city
Ada,30,London
Bob,25,Paris"""

rows = list(csv.DictReader(io.StringIO(text)))
print(json.dumps(rows, indent=2))
# [
#   {"name": "Ada", "age": "30", "city": "London"},
#   {"name": "Bob", "age": "25", "city": "Paris"}
# ]

Every cell stays a string: age is "30", not 30. This page sets Papa dynamicTyping: true, so unquoted 30 becomes a JSON number and quoted "30" stays a string. The default delimiter is a comma; pass delimiter=';' for European CSVs or a literal tab for TSV files — this page auto-detects those. Completely empty lines are skipped, matching skipEmptyLines: true. A whitespace-only line is still a row. Missing fields use restval (default None → null). Extra fields go under restkey (default None), so json.dumps writes a "null" array key. Duplicate headers keep the last column (name,name plus Ada,Bob becomes {"name": "Bob"}); Papa renames extras to name_1. Open Excel exports with encoding='utf-8-sig' so a BOM does not glue itself to the first key. For the Papa Parse walkthrough, see CSV to JSON in the Browser with Papa Parse.

CSV to JSON in the shell

There is no POSIX CSV-to-JSON converter. csvkit csvjson (a Python wrapper around agate, Debian csvkit / python3-csvkit) reads a header row and writes a JSON array of objects — the same shape Convert writes. On the documented mapping (name,age,city with Ada,30,London and Bob,25,Paris), csvjson -i 2 pretty-prints with 2-space indent, matching this page. Default csvjson is compact (one line, a space after each colon). Integers serialize as 30.0 because agate stores them as floats; this page writes 30. csvjson is not POSIX. For the Papa Parse and csv.DictReader snippets, see Convert CSV to JSON in JavaScript and CSV to JSON in Python above.

csvkit csvjson (Linux / pip)

Confirmed here with csvkit 1.4.0 (csvjson 1.4.0). Use printf, not echo. -i / --indent is 2-space pretty-print. Type inference is on unless you pass -I / --no-inference:

# Pretty JSON (same 2-space indent as this page; ages are 30.0)
printf '%s' 'name,age,city
Ada,30,London
Bob,25,Paris' | csvjson -i 2
# [
#   {
#     "name": "Ada",
#     "age": 30.0,
#     "city": "London"
#   },
#   {
#     "name": "Bob",
#     "age": 25.0,
#     "city": "Paris"
#   }
# ]

# Compact JSON (this page always pretty-prints)
printf '%s' 'name,age,city
Ada,30,London
Bob,25,Paris' | csvjson
# [{"name": "Ada", "age": 30.0, "city": "London"}, {"name": "Bob", "age": 25.0, "city": "Paris"}]

# Keep every cell a string (like csv.DictReader above)
printf '%s' 'name,age,city
Ada,30,London
Bob,25,Paris' | csvjson -I -i 2
# "age": "30"

Default inference also turns "", na, n/a, none, null, and . into JSON null. This page keeps those strings except a truly empty field, which is null in both. --blanks keeps the placeholder strings and writes an empty cell as "". yes / YES / Y become true; no / NO / N become false. This page only types true / false. on / off stay strings in both. +30 and +1e2 become 30.0 and 100.0 in csvjson; this page keeps those plus-prefixed cells as strings. A date-only cell such as 2026-09-18 stays a string in both. A value outside IEEE-754 exact integers such as 9007199254740993 becomes 9007199254740992.0 in csvjson; this page leaves that cell a string (Papa's FLOAT test stays inside ±2^53). A padded ID such as 007 becomes 7.0 here and 7 on this page; -I keeps "007". Completely empty lines and quoted empty rows become {"name":null,"age":null} objects in csvjson; this page skips them (skipEmptyLines: true). A comma-only row is a null object in both. Duplicate headers rename to name_2; Papa uses name_1. An extra field throws Row 0 has 3 values, but Table only has 2 columns.; this page keeps the row and stores extras under __parsed_extra. A missing field writes null for that key; this page omits the key. Empty stdin exits 1 with StopIteration; Convert stays disabled until there is text. A header-only file writes [] in both. -i 2 does not append a newline after the closing ]; this page's JSON.stringify does not either. --stream writes NDJSON (one object per line) and cannot be combined with -i. -k name keys the object by that column instead of writing an array. -H / --no-header-row invents a, b, c keys. Semicolon, tab, and pipe delimiters sniff the same way as this page when the default sniff limit can see them; -y 0 disables sniffing, so a semicolon file becomes one column unless you pass -d ';' or -t for tabs. GeoJSON flags (--lat / --lon) are not this converter. python3 -m csvkit.utilities.csvjson is the same CLI; python3 -m csvjson is not a module. miller mlr --icsv --ojson is a different converter: on this mapping it writes JSON integers without a trailing .0, and it is not csvkit. Homebrew brew install csvkit and pip pip install csvkit ship the same command. For the Papa Parse walkthrough, see CSV to JSON in the Browser with Papa Parse. The reverse direction is JSON to CSV converter.

Headers, delimiters and quotes

Header row becomes keys

The first line of the CSV is treated as the header row. Each column name becomes a key in the resulting JSON objects. For example, name,age,city produces objects with name, age, and city properties.

Delimiter detection

This tool auto-detects the delimiter by checking for commas, semicolons, tabs, and pipes. European CSVs often use semicolons (because commas are decimal separators). Tab-separated files (.tsv) also work. You do not need to specify the delimiter.

Quoted fields (RFC 4180)

If a value contains the delimiter character, a newline, or a double quote, it must be wrapped in double quotes. A double quote inside a quoted field is escaped by doubling it: "She said ""hello""" becomes She said "hello". This tool follows RFC 4180 quoting rules.

Technical details

  1. Paste CSV, load the sample, or choose a .csv or .txt file. Upload uses FileReader.readAsText and fills the CSV box; it does not call Papa.parse(file). Nothing is sent to a server.
  2. Convert runs Papa.parse on that string with header: true, skipEmptyLines: true, and dynamicTyping: true. The delimiter is left blank so Papa auto-detects from comma, tab, pipe, semicolon, or the ASCII record/unit separators (RFC 4180-style quoting).
  3. Completely empty lines are skipped; whitespace-only rows are not (that needs skipEmptyLines: 'greedy'). Papa's testEmptyLine for the boolean is s.length === 1 && s[0].length === 0— a single empty field. A blank line between name,age / Ada,30 and Bob,40 is dropped, so Convert writes [{"name":"Ada","age":30},{"name":"Bob","age":40}]. A quoted empty row "" is also skipped. A spaces-only row is one non-empty field; it drops the average field count below 1.99 (UndetectableDelimiter plus TooFewFields) and this page writes no JSON. A comma-only row , is two empty fields ({"name":null,"age":null}) and Convert succeeds. This page does not enable greedy skip. Numbers that look like decimal literals strictly inside ±2^53 and the strings true / false are typed; other cells stay strings. A padded ID such as 007 matches that FLOAT test, so parseFloat turns it into 7 and the row becomes {"zip":7}. Quoted CSV "007" is still 7. 00123 becomes 123. 00 becomes 0. 007a stays "007a". A date-only cell such as 2026-09-18 stays a string. This page does not turn off dynamicTyping.
  4. That same FLOAT test accepts an optional minus, not a leading plus, so n,+30 becomes {"n":"+30"}. RFC 4180 quotes around "+30" are stripped first, so a quoted +30 is still the string "+30". -30 becomes the number -30. 30 becomes 30. +30.5 and +007 stay strings. Plus is legal in an exponent, so 1e+2 becomes 100; +1e2 stays "+1e2". JSON has no plus-prefixed number (RFC 8259 §6).
  5. That same FLOAT regex requires one or more digits after e or E ([eE][-+]?\d+), so n,1e becomes {"n":"1e"}. RFC 4180 quotes around "1e" are stripped first, so a quoted 1e is still the string "1e". 1e+ stays "1e+". 1e- stays "1e-". 1E stays "1E". -1e stays "-1e". 1e+2 becomes the number 100. 1e2 and 1E2 are also 100. 1e-2 becomes 0.01. 1e+0 becomes 1. .5e stays ".5e"; 1.e stays "1.e" (.5e2 and 1.e2 are complete and become 50 and 100). 1e+2.5 stays "1e+2.5". e2 stays "e2". Surrounding spaces are kept, so 1e stays " 1e " — the regex never matches, so parseFloat is not called. parseFloat of "1e" or "1e+" would be 1 (they stop at the incomplete exponent); Papa never takes that path. JSON.parse of "1e" or "1e+" throws (RFC 8259 §6 exp needs one or more DIGIT). JSON.parse of "1e+2" is 100. Write 1e+2 or 100 for the number. In a semicolon table, n;x plus 1e;foo is {"n":"1e","x":"foo"}. A CRLF 1e is the same . This page does not coerce an incomplete exponent.
  6. That same FLOAT regex has no 0x or 0X hex prefix, so n,0x1 becomes {"n":"0x1"}. RFC 4180 quotes around "0x1" are stripped first, so a quoted 0x1 is still the string "0x1". 0XFF stays "0XFF". 0xff stays "0xff". -0x1 stays "-0x1". +0x1 stays "+0x1". 0x stays "0x". 0x10 stays "0x10" (not 16). 0b10 stays "0b10". 0o10 stays "0o10". Surrounding spaces are kept, so 0x1 stays " 0x1 " — the regex never matches, so parseFloat is not called. parseFloat of "0x1" would be 0 (it stops at the x); Papa never takes that path. Number and parseInt of "0x1" are 1. JSON.parse of "0x1" throws (RFC 8259 §6 has no hex prefix). YAML 1.2.2 Core 0x [0-9a-fA-F]+ would turn 0x1 into 1; this page does not. Write 1 for the number (or 16 for 0x10). In a semicolon table, n;x plus 0x1;foo is {"n":"0x1","x":"foo"}. A CRLF 0x1 is the same. This page does not coerce a hex prefix.
  7. That same FLOAT regex matches a complete exponent such as 1e16 (e plus one or more digits). After the match, testFloat calls parseFloat and keeps a Number only when floatValue > MIN_FLOAT && floatValue < MAX_FLOAT, where MAX_FLOAT is 2^53. parseFloat of "1e16" is 10000000000000000, which is not < MAX_FLOAT, so n,1e16 becomes {"n":"1e16"}. RFC 4180 quotes around "1e16" are stripped first, so a quoted 1e16 is still the string "1e16". 1e+16 stays "1e+16". 1E16 stays "1E16". -1e16 stays "-1e16". 1.0e16 stays "1.0e16". 10e15 stays "10e15" (parseFloat is also 1e16). 1e15 becomes the number 1000000000000000. 9e15 becomes 9000000000000000. 1e+2 still becomes 100. If the exclusive-range check fails, the original cell is kept, so 1e16 stays " 1e16 " — the regex matched and parseFloat ran, but 1e16 is not < MAX_FLOAT. +1e16 stays "+1e16" because of the leading plus, not this range check. JSON.parse of "1e16" is the number 10000000000000000 (RFC 8259 §6 allows exp). Write 1e15 for the number 1000000000000000, or 9007199254740991 for the largest typed integer. In a semicolon table, n;x plus 1e16;foo is {"n":"1e16","x":"foo"}. A CRLF 1e16 is the same. This is not the incomplete-exponent 1e case and not the underflow 1e-324 case. This page does not parse integers as BigInt.
  8. That same FLOAT regex also matches a complete tiny exponent such as 1e-324 (e, a minus, and one or more digits). After the match, testFloat calls parseFloat and keeps a Number only when floatValue > MIN_FLOAT && floatValue < MAX_FLOAT. parseFloat of "1e-324" is 0 (IEEE-754 underflow; Number.MIN_VALUE is 5e-324). 0 is strictly inside ±2^53, so n,1e-324 becomes {"n":0}. RFC 4180 quotes around "1e-324" are stripped first, so a quoted 1e-324 is still 0. 1e-325 is also 0. 2e-324 is 0 (rounds toward zero). 5e-324 becomes 5e-324. 4e-324 becomes 5e-324. 1e-323 becomes 1e-323. 1e-308 becomes 1e-308. 1E-324 and 1.0e-324 are also 0. 10e-325 is 0. -1e-324 is JavaScript -0; JSON.stringify writes 0. 1e-324 becomes 0 — the regex matched and parseFloat ran, and 0 is inside the range. +1e-324 stays "+1e-324" because of the leading plus, not this underflow. JSON.parse of "1e-324" is also 0 (RFC 8259 §6 allows exp). Write 5e-324 for Number.MIN_VALUE. In a semicolon table, n;x plus 1e-324;foo is {"n":0,"x":"foo"}. A CRLF 1e-324 is the same. This is not the complete-exponent 1e16 case (that original string is kept) and not the incomplete-exponent 1e case. This page does not keep underflow as a string.
  9. That same FLOAT test also accepts a leading decimal such as .5 or a trailing decimal such as 1., so n,.5 becomes {"n":0.5} and n,1. becomes {"n":1}. RFC 4180 quotes around ".5" are stripped first, so a quoted .5 is still 0.5. A quoted 1. is still 1. -.5 becomes the number -0.5. -1. becomes -1. 0.5 stays 0.5. 1.0 becomes 1. A lone . stays the string ".". 1.2.3 stays "1.2.3". .5e2 becomes 50; 1.e2 becomes 100. JSON.parse rejects .5 and 1. (RFC 8259 §6 requires an integer part and at least one digit after a decimal point).
  10. That same FLOAT regex has no underscore, so n,1_000 becomes {"n":"1_000"}. RFC 4180 quotes around "1_000" are stripped first, so a quoted 1_000 is still the string "1_000". 1000 becomes the number 1000. 1_000.5 stays "1_000.5". -1_000 stays "-1_000". +1_000 stays "+1_000". 1_000_000 stays "1_000_000". 1_000e2 stays "1_000e2". Surrounding spaces are kept, so 1_000 stays " 1_000 " — the regex never matches, so parseFloat is not called. parseFloat of "1_000" would be 1 (it stops at the underscore); Papa never takes that path. JSON.parse of "1_000" throws (RFC 8259 §6 has no digit separator). Write 1000 for the number. In a semicolon table, n;x plus 1_000;foo is {"n":"1_000","x":"foo"}. Unquoted 1,000 in a comma table is TooManyFields. This page does not strip underscores.
  11. After that FLOAT regex matches, Papa's testFloat calls parseFloat and keeps a Number only when floatValue > MIN_FLOAT && floatValue < MAX_FLOAT, where MAX_FLOAT is 2^53 (9007199254740992). Those bounds are exclusive, so 9007199254740991 becomes the number 9007199254740991 and n,9007199254740992 becomes {"n":"9007199254740992"}. RFC 4180 quotes around "9007199254740992" are stripped first, so a quoted 9007199254740992 is still the string "9007199254740992". -9007199254740991 becomes the number -9007199254740991. -9007199254740992 stays "-9007199254740992". 9007199254740993 stays "9007199254740993" because parseFloat of that digit string is 9007199254740992, which is not < MAX_FLOAT. JSON.parse of "9007199254740992" is the number 9007199254740992 (exactly representable); JSON.parse of "9007199254740993" is 9007199254740992 (IEEE-754). This page does not parse integers as BigInt.
  12. That same FLOAT regex allows surrounding whitespace (/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/), so n, 30 becomes {"n":30}. parseFloat(" 30 ") is 30. RFC 4180 quotes around " 30 " are stripped first, so a quoted 30 is still 30. A leading-only space and a trailing-only space are also 30. -30 becomes -30. .5 becomes 0.5. 1. becomes 1. 1e+2 becomes 100. An internal space such as 3 0 stays "3 0". A space-only cell stays " ". Papa's boolean test is exact equality, so true stays " true ". Papa's ISO_DATE test is a full-string match, so 2026-09-18T12:00:00Z stays a string. If the exclusive-range check fails, the original cell is kept, so 9007199254740992 stays " 9007199254740992 ". 9007199254740991 becomes 9007199254740991. JSON.parse of " 30 " is also 30 (RFC 8259 insignificant whitespace). This page does not trim cells before dynamicTyping.
  13. That same FLOAT \s includes tab, but an unquoted both-side tab around 30 on a one-column header is first a delimiter. Papa leaves the delimiter blank, so guessDelimiter tries comma, tab, pipe, semicolon, and the ASCII record/unit separators, and keeps a candidate only when the average field count is greater than 1.99. Header n plus an unquoted tab, 30, and a tab is three fields, so tab wins and the row is TooManyFields (expected 1 fields but parsed 3). This page shows that message and writes no JSON. RFC 4180 quotes keep those tabs inside one cell, so tab is not guessed. parseFloat("\\t30\\t") is 30, so a two-column comma table n,x plus a quoted tab-padded 30 and foo becomes {"n":30,"x":"foo"}. The same two-column table with an unquoted tab-padded 30 is also 30 because comma already won. A leading-only tab or a trailing-only tab on a one-column header averages 1.5 fields, so tab is not chosen; Papa still types 30, but UndetectableDelimiter defaults to comma and this page still writes no JSON. A quoted tab-padded true stays a string (boolean is exact equality). A quoted tab-padded ISO timestamp stays a string (ISO_DATE is a full-string match). If the exclusive-range check fails, the original cell is kept, so a quoted tab-padded 9007199254740992 stays that tab-padded string. JSON.parse of a tab-padded 30 is also 30 (RFC 8259 insignificant whitespace). This page does not expose a delimiter picker.
  14. A clean one-column table is a different delimiter warning. Header name then Ada averages 1 field, so guessDelimiter keeps no candidate (threshold 1.99). Papa still defaults to comma and result.data is [{"name":"Ada"}], but Convert treats any result.errors as fatal (errors.length > 0), so UndetectableDelimiter (Unable to auto-detect delimiting character; defaulted to ',') is shown and this page writes no JSON. zip then 007 is the same warning; Papa would type [{"zip":7}] but the page still writes no JSON. Quoted "name" / "Ada" is the same. Two-column n,x plus 30,foo averages 2 fields, comma wins, there is no warning, and Convert writes [{"n":30,"x":"foo"}]. Adding a dummy second column (name,x then Ada,) becomes [{"name":"Ada","x":null}] because the empty cell is null, and Convert succeeds. This is not TooManyFields. This page does not ignore delimiter warnings and has no delimiter picker.
  15. A two-column semicolon table is the success path for that same guessDelimiter list. name;age plus Ada;30 averages 2 fields, so semicolon wins. There is no UndetectableDelimiter, and Convert writes [{"name":"Ada","age":30}]. name|age plus Ada|30 is the same with pipe. Papa's FLOAT regex is /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/ — a decimal point, not a comma — so n;x plus 3,14;foo becomes {"n":"3,14","x":"foo"}. RFC 4180 quotes around "3,14" are stripped first, so a quoted 3,14 is still the string "3,14". Write 3.14 for a JSON number: n;x plus 3.14;foo becomes {"n":3.14,"x":"foo"}. A quoted "3.14" is still 3.14. A comma inside a quoted field in a semicolon table stays in the field (Ada;"hel,lo" is {"name":"Ada","note":"hel,lo"}). Mixed delimiters fail: name,age plus Ada;30 is UndetectableDelimiter plus TooFewFields ({"name":"Ada;30"}); name;age plus Ada,30 is UndetectableDelimiter plus TooManyFields. Convert treats those errors as fatal and writes no JSON. Unquoted 3,14 in a comma table is also TooManyFields (3 and 14 are two fields). A one-column note then hello;world keeps the semicolon inside one cell and is still UndetectableDelimiter. A space after the semicolon (Ada; 30) becomes the number 30 because FLOAT allows surrounding whitespace. zip;x plus 007;foo is still {"zip":7,"x":"foo"}. An empty cell after a semicolon (Ada;) is null. This is not the tab-padded one-column TooManyFields and not the one-column name / Ada UndetectableDelimiter. This page does not expose a delimiter picker or a decimal-comma locale toggle.
  16. Duplicate headers are renamed so later columns do not overwrite earlier ones. The first name stays name; a later name becomes name_1, then name_2. name,name plus Ada,Bob becomes {"name":"Ada","name_1":"Bob"}. RFC 4180 quotes around "name" are stripped first, so a quoted "name","name" is the same. A third name becomes name_2 ({"name":"Ada","name_1":"Bob","name_2":"Cam"}). If name_1 already exists as a real header (name,name_1,name), the later name becomes name_2. name and Name are different keys (case-sensitive). A leading space (name, name) is a different key. Two empty headers become "" and _1. meta.renamedHeaders is { name_1: "name" }, but this page does not expose that map or transformHeader. JSON.parse of {"name":"Ada","name":"Bob"} keeps the last value (RFC 8259 §4); Papa avoids that overwrite. There is no FieldMismatch; Convert writes the JSON.
  17. After each data row is built, Papa compares the parsed field count with the header count. name,age,city plus Ada,30 is TooFewFields (Too few fields: expected 3 fields but parsed 2). Papa still builds {"name":"Ada","age":30} and omits city (the missing key is not null). Convert treats any result.errors as fatal (errors.length > 0), so that FieldMismatch is shown and this page writes no JSON. A one-cell row Ada is TooFewFields expected 3 parsed 1 ({"name":"Ada"}). RFC 4180 quotes around "Ada" do not change the count. A trailing comma (Ada,30,) is three fields: the empty city becomes JSON null and Convert writes {"name":"Ada","age":30,"city":null}. An empty middle cell (Ada,,NY) is also three fields ({"name":"Ada","age":null,"city":"NY"}). A long row such as name,age plus Ada,30,extra is TooManyFields (Too many fields: expected 2 fields but parsed 3); Papa stores the extra cell on __parsed_extra as ["extra"]. Two extras become ["extra","more"]. A quoted extra is the same. This is not the tab-padded one-column TooManyFields (that is delimiter detect). This page does not ignore FieldMismatch and has no partial-output mode.
  18. A field that starts with a quote must find a closing quote before EOF (RFC 4180). name,note plus Ada,"hello is MissingQuotes (Quoted field unterminated). Papa still builds {"name":"Ada","note":"hello"} (the opening quote is skipped; the rest of the input stays in note). Convert treats any result.errors as fatal (errors.length > 0), so that Quotes error is shown and this page writes no JSON. A closed Ada,"hello" is the same object and Convert writes the JSON. A comma inside the unclosed quote (Ada,"hello,world) stays in note ({"name":"Ada","note":"hello,world"}). A closed multiline quote (Ada,"hello then a newline then world") is valid RFC 4180 and Convert writes {"name":"Ada","note":"hello\nworld"}. An unclosed quote that continues onto the next line (Ada,"hello then Bob,ok) swallows that line into note ({"name":"Ada","note":"hello\nBob,ok"}) and is still MissingQuotes. This is not FieldMismatch (that is TooFewFields / TooManyFields). This page does not ignore Quotes errors and has no partial-output mode.
  19. After a closing quote, Papa accepts a delimiter, a newline, or spaces then a delimiter or newline (extraSpaces). A trailing space at EOF after Ada,"hello" is not those. name,note plus Ada,"hello" and a trailing space is InvalidQuotes (Trailing quote on quoted field is malformed) plus MissingQuotes (Quoted field unterminated). Papa still builds {"name":"Ada","note":"hello\" "} (the closing quote and the space stay in note). Convert treats any result.errors as fatal (errors.length > 0), so those Quotes errors are shown and this page writes no JSON. A closed Ada,"hello" is {"name":"Ada","note":"hello"} and Convert writes the JSON. A space inside the quotes (Ada,"hello ") is valid RFC 4180 and Convert writes {"name":"Ada","note":"hello "}. A space after the close then a newline is extraSpaces and Convert writes {"name":"Ada","note":"hello"}. A space after the close then a comma ("Ada" ,hello) is also extraSpaces and Convert writes {"name":"Ada","note":"hello"}. A space before the opening quote (Ada, "hello") is not a quoted field (the quote is not adjacent to the delimiter) and Convert writes {"name":"Ada","note":" \"hello\""}. A tab after the close is also InvalidQuotes ({"name":"Ada","note":"hello\"\ "}). A quoted 30 then a trailing space stays the string "30\" " (not the number 30). A quoted empty cell plus a trailing space (Ada,"" plus a space) is the same pair of Quotes errors; Papa still builds {"name":"Ada","note":"\" "} (not null). This is not the unclosed MissingQuotes-only case (Ada,"hello with no close). This page does not ignore Quotes errors and has no quote-repair mode.
  20. RFC 4180 §7 says a double-quote inside a quoted field must be escaped by another double quote (ABNF 2DQUOTE). name,note plus Ada,"hel""lo" is that pair: the "" inside the quotes is one quote, so Convert writes {"name":"Ada","note":"hel\"lo"} and there is no Quotes error. JSON.stringify writes the quote as \" (RFC 8259). The RFC example "aaa","b""bb","ccc" becomes {"a":"aaa","b":"b\"bb","c":"ccc"}. A quote at the start (Ada,"""hello") is {"name":"Ada","note":"\"hello"}. A quote at the end (Ada,"hello""") is {"name":"Ada","note":"hello\""}. A field that is only a quote (Ada,"""") is {"name":"Ada","note":"\""} (not null; a quoted empty Ada,"" is still null). A comma inside the escaped field (Ada,"hel"",lo") stays in note ({"name":"Ada","note":"hel\",lo"}). A doubled quote in a header (name,"no""te" plus Ada,hello) becomes the key no"te. A single inner quote without doubling (Ada,"hel"lo") is InvalidQuotes (Trailing quote on quoted field is malformed); Papa still builds {"name":"Ada","note":"hel\"lo"}, but this page treats that Quotes error as fatal and writes no JSON. A backslash is not RFC 4180 (Ada,"hel\"lo") and is also InvalidQuotes. An unquoted inner quote (Ada,hel"lo) is accepted by Papa as {"name":"Ada","note":"hel\"lo"} and Convert writes that JSON (RFC 4180 §5 would forbid a quote in an unquoted field). An unquoted doubled pair (Ada,hel""lo) keeps both quotes ({"name":"Ada","note":"hel\"\"lo"}). An odd triple mid-field (Ada,"hel"""lo") is InvalidQuotes. A doubled quote inside a number-looking cell (Ada,"3""0") stays the string "3\"0" (not the number 30). This is not the trailing-space InvalidQuotes case (Ada,"hello" plus a space) and not the unclosed MissingQuotes-only case (Ada,"hello with no close). This page does not ignore Quotes errors and has no quote-repair mode.
  21. Papa's boolean test is exact equality: value === 'true' or value === 'TRUE' becomes JSON true; value === 'false' or value === 'FALSE' becomes JSON false. Title-case True and False are not those four strings, so flag,True becomes {"flag":"True"} and False stays "False". RFC 4180 quotes around "true" are stripped first, so a quoted true is still the boolean true; a quoted True stays "True". yes and Yes stay strings. JSON has only lowercase true and false (RFC 8259 §3).
  22. After those FLOAT and true / false tests, Papa's ISO_DATE test matches a full-string ISO-8601 timestamp (YYYY-MM-DD, T, hours and minutes, optional seconds and a fraction, then Z or a ±HH:MM offset) and turns it into new Date(value). Convert then pretty-prints result.data with JSON.stringify. Date.prototype.toJSON (ECMA-262) calls toISOString, which writes UTC with milliseconds, so 2026-09-18T12:00:00Z becomes {"when":"2026-09-18T12:00:00.000Z"}. Quoted CSV "2026-09-18T12:00:00Z" is still a Date. A space instead of T, or a T-time without an offset, stays a string. An offset such as 2026-09-18T12:00:00-05:00 stringifies as 2026-09-18T17:00:00.000Z. JSON has no Date type (RFC 8259).
  23. After those FLOAT, true / false, and ISO_DATE tests, Papa's parseDynamic returns value === '' ? null : value. An empty cell is that empty string, so name,note plus Ada, becomes {"name":"Ada","note":null}. RFC 4180 quotes around "" are stripped first, so a quoted empty cell is still null. A space-only cell stays the string " ". The word null stays the string "null". N/A stays "N/A". skipEmptyLines drops a completely empty line, not an empty cell inside a kept row. A blank line between Ada,30 and Bob,40 is skipped; a spaces-only row is not. JSON.stringify writes the null token (RFC 8259 §3) and keeps the key.
  24. Papa leaves comments at the default false. RFC 4180 has no comment syntax, so a line that starts with # is a data row. name,age plus # note,ignored plus Ada,30 has no error, and Convert writes [{"name":"# note","age":"ignored"},{"name":"Ada","age":30}]. A CRLF hash line is the same. #Ada,30 plus Bob,40 is [{"name":"#Ada","age":30},{"name":"Bob","age":40}]. A one-field # comment row (no comma) is UndetectableDelimiter plus TooFewFields; Papa still builds {"name":"# comment"}, but this page writes no JSON. A quoted "# comment" is a field value ({"name":"Ada","note":"# comment"}). A space before the hash is still a data row. // note,30 is also kept. comments: true (or comments: '#') would skip a line whose first characters are #; this page does not set that option. A hash in the header (#name,age plus Ada,30) becomes the key #name. This is not skipEmptyLines (a blank line is dropped; a # line is not).
  25. If Papa reports any errors (for example TooFewFields / TooManyFields / MissingQuotes / InvalidQuotes), the page shows those messages and does not write JSON — even when some rows parsed. On success it pretty-prints result.data with 2-space JSON.stringify. Creates converted.json. Download Click JSON to run the conversion. Download saves that string as application/json (converted.json). This page does not convert JSON back to CSV or read Excel workbooks.

FAQ

Does this tool upload my CSV?
No. All parsing runs in your browser using Papa Parse. Your data is never sent to a server.
What file name does Download create?
Download creates converted.json containing the parsed array with 2-space indentation.
How are duplicate column headers handled?
Papa Parse renames duplicates by appending _1, _2, etc. For example, two "name" columns become "name" and "name_1".
Does it auto-detect delimiters?
Yes. Papa Parse detects commas, semicolons, tabs, and other common delimiters based on field count consistency.
Are numbers converted or kept as strings?
With dynamicTyping enabled, Papa Parse converts values that look like numbers (e.g., 30, 3.14), quoted or not, to JavaScript numbers. CSV quotes only escape delimiters, quotes and newlines; they do not keep a value as a string.

Related